forked from TrueCloudLab/frostfs-node
[#643] pkg: Sync method names and commentaries to them
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
25391111ad
commit
48827f42d3
33 changed files with 41 additions and 41 deletions
|
@ -68,7 +68,7 @@ func (ip *DaughterTrustIteratorProvider) InitAllDaughtersIterator(
|
|||
// InitConsumersIterator returns iterator over all daughters
|
||||
// of the current node(manager) and all their consumers' local
|
||||
// trusts for ctx.Epoch() epoch and ctx.I() iteration.
|
||||
|
||||
//
|
||||
// Returns ErrNoData if there is no trust data for
|
||||
// specified epoch and iteration.
|
||||
func (ip *DaughterTrustIteratorProvider) InitConsumersIterator(
|
||||
|
|
|
@ -21,7 +21,7 @@ type (
|
|||
// Contracts is an interface of the storage
|
||||
// of the alphabet contract addresses.
|
||||
Contracts interface {
|
||||
// Get by index must return address of the
|
||||
// GetByIndex must return address of the
|
||||
// alphabet contract by index of the glagolitic
|
||||
// letter (e.g 0 for Az, 40 for Izhitsa).
|
||||
//
|
||||
|
|
|
@ -74,9 +74,9 @@ type epochAuditReporter struct {
|
|||
rep audit.Reporter
|
||||
}
|
||||
|
||||
// AuditProcessor manages audit tasks and fills queue for next epoch. This
|
||||
// process must not be interrupted by new audit epoch, so we limit pool size
|
||||
// for processor to one.
|
||||
// ProcessorPoolSize limits pool size for audit Processor. Processor manages
|
||||
// audit tasks and fills queue for next epoch. This process must not be interrupted
|
||||
// by new audit epoch, so we limit pool size for processor to one.
|
||||
const ProcessorPoolSize = 1
|
||||
|
||||
// New creates audit processor instance.
|
||||
|
|
|
@ -15,9 +15,9 @@ import (
|
|||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
// GovernanceProcessor manages governance sync tasks. This process must not be
|
||||
// interrupted by other sync operation, so we limit pool size for processor to
|
||||
// one.
|
||||
// ProcessorPoolSize limits pool size for governance Processor. Processor manages
|
||||
// governance sync tasks. This process must not be interrupted by other sync
|
||||
// operation, so we limit pool size for processor to one.
|
||||
const ProcessorPoolSize = 1
|
||||
|
||||
type (
|
||||
|
|
|
@ -83,7 +83,7 @@ func WithPermissions(perm os.FileMode) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithSizeLimit returns option to specify maximum size
|
||||
// WithObjectSizeLimit returns option to specify maximum size
|
||||
// of the objects stored in Blobovnicza.
|
||||
func WithObjectSizeLimit(lim uint64) Option {
|
||||
return func(c *cfg) {
|
||||
|
|
|
@ -24,7 +24,7 @@ func (p *GetRangePrm) SetAddress(addr *objectSDK.Address) {
|
|||
p.addr = addr
|
||||
}
|
||||
|
||||
// SetAddress sets range of the requested payload data .
|
||||
// SetRange sets range of the requested payload data .
|
||||
func (p *GetRangePrm) SetRange(rng *objectSDK.Range) {
|
||||
p.rng = rng
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ func (p *GetRangeRes) RangeData() []byte {
|
|||
return p.rngData
|
||||
}
|
||||
|
||||
// Get reads the object from Blobovnicza by address.
|
||||
// GetRange reads range of the object from Blobovnicza by address.
|
||||
//
|
||||
// Returns any error encountered that
|
||||
// did not allow to completely read the object.
|
||||
|
|
|
@ -6,7 +6,7 @@ type GetSmallPrm struct {
|
|||
rwBlobovniczaID
|
||||
}
|
||||
|
||||
// GetBigRes groups resulting values of GetBig operation.
|
||||
// GetSmallRes groups resulting values of GetSmall operation.
|
||||
type GetSmallRes struct {
|
||||
roObject
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ package blobstor
|
|||
|
||||
import "github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree"
|
||||
|
||||
// FSTree returns file-system tree for big object store.
|
||||
// DumpInfo returns information about blob stor.
|
||||
func (b *BlobStor) DumpInfo() fstree.Info {
|
||||
return b.fsTree.Info
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ type RngPrm struct {
|
|||
addr *objectSDK.Address
|
||||
}
|
||||
|
||||
// GetRes groups resulting values of GetRange operation.
|
||||
// RngRes groups resulting values of GetRange operation.
|
||||
type RngRes struct {
|
||||
obj *object.Object
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ type MovableRes struct {
|
|||
addrList []*objectSDK.Address
|
||||
}
|
||||
|
||||
// WithAddress sets address of the object to prevent moving into another shard.
|
||||
// AddressList returns resulting addresses of Movable operation.
|
||||
func (p *MovableRes) AddressList() []*objectSDK.Address {
|
||||
return p.addrList
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ type ToMoveItPrm struct {
|
|||
// ToMoveItRes encapsulates results of ToMoveIt operation.
|
||||
type ToMoveItRes struct{}
|
||||
|
||||
// WithAdderss sets object address that should be marked to move into another
|
||||
// WithAddress sets object address that should be marked to move into another
|
||||
// shard.
|
||||
func (p *ToMoveItPrm) WithAddress(addr *objectSDK.Address) *ToMoveItPrm {
|
||||
if p != nil {
|
||||
|
|
|
@ -16,7 +16,7 @@ type RngPrm struct {
|
|||
addr *objectSDK.Address
|
||||
}
|
||||
|
||||
// RngPrm groups resulting values of GetRange operation.
|
||||
// RngRes groups resulting values of GetRange operation.
|
||||
type RngRes struct {
|
||||
obj *object.Object
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ func WithMetaBaseOptions(opts ...meta.Option) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithMetaBaseOptions returns option to set internal metabase options.
|
||||
// WithWriteCacheOptions returns option to set internal write cache options.
|
||||
func WithWriteCacheOptions(opts ...writecache.Option) Option {
|
||||
return func(c *cfg) {
|
||||
c.writeCacheOpts = opts
|
||||
|
|
|
@ -31,7 +31,7 @@ func (w *ClientWrapper) PutAuditResult(result *auditAPI.Result) error {
|
|||
PutAuditResult(args)
|
||||
}
|
||||
|
||||
// ListAuditResults returns a list of all audit result IDs inside audit contract.
|
||||
// ListAllAuditResultID returns a list of all audit result IDs inside audit contract.
|
||||
func (w *ClientWrapper) ListAllAuditResultID() ([]ResultID, error) {
|
||||
args := audit.ListResultsArgs{}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ func defaultOpts() *opts {
|
|||
return new(opts)
|
||||
}
|
||||
|
||||
// TryNotaryInvoke returns option to enable
|
||||
// TryNotary returns option to enable
|
||||
// notary invocation tries.
|
||||
func TryNotary() Option {
|
||||
return func(o *opts) {
|
||||
|
|
|
@ -41,7 +41,7 @@ func (p *PutSizeArgs) SetReporterKey(v []byte) {
|
|||
p.reporterKey = v
|
||||
}
|
||||
|
||||
// Put invokes the call of put container method
|
||||
// PutSize invokes the call of put container size method
|
||||
// of NeoFS Container contract.
|
||||
func (c *Client) PutSize(args PutSizeArgs) error {
|
||||
err := c.client.Invoke(
|
||||
|
|
|
@ -278,7 +278,7 @@ type Estimation struct {
|
|||
Reporter []byte
|
||||
}
|
||||
|
||||
// Estimation is a structure of grouped container load estimation inside Container contract.
|
||||
// Estimations is a structure of grouped container load estimation inside Container contract.
|
||||
type Estimations struct {
|
||||
ContainerID *cid.ID
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ func defaultOpts() *opts {
|
|||
return new(opts)
|
||||
}
|
||||
|
||||
// TryNotaryInvoke returns option to enable
|
||||
// TryNotary returns option to enable
|
||||
// notary invocation tries.
|
||||
func TryNotary() Option {
|
||||
return func(o *opts) {
|
||||
|
|
|
@ -13,8 +13,8 @@ type ConfigArgs struct {
|
|||
key []byte
|
||||
}
|
||||
|
||||
// EpochValues groups the stack parameters
|
||||
// returned by get epoch number test invoke.
|
||||
// ConfigValues groups the stack parameters
|
||||
// returned by get config test invoke.
|
||||
type ConfigValues struct {
|
||||
val interface{}
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ func (c *Client) NetMap(_ GetNetMapArgs) (*GetNetMapValues, error) {
|
|||
return peersFromStackItems(prms, c.netMapMethod)
|
||||
}
|
||||
|
||||
// NetMap performs the test invoke of get snapshot of network map
|
||||
// Snapshot performs the test invoke of get snapshot of network map
|
||||
// from NeoFS Netmap contract. Contract saves only one previous epoch,
|
||||
// so all invokes with diff > 1 return error.
|
||||
func (c *Client) Snapshot(a GetSnapshotArgs) (*GetNetMapValues, error) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
netmap2 "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
)
|
||||
|
||||
// Fetch returns current netmap node infos.
|
||||
// Snapshot returns current netmap node infos.
|
||||
// Consider using pkg/morph/client/netmap for this.
|
||||
func (w *Wrapper) Snapshot() (*netmap.Netmap, error) {
|
||||
res, err := w.client.Snapshot(netmap2.GetSnapshotArgs{})
|
||||
|
|
|
@ -20,7 +20,7 @@ type (
|
|||
id ReputationID
|
||||
}
|
||||
|
||||
// GetResults groups the result of "get reputation value" and
|
||||
// GetResult groups the result of "get reputation value" and
|
||||
// "get reputation value by reputation id" test invocations.
|
||||
GetResult struct {
|
||||
reputations []reputation.GlobalTrust
|
||||
|
|
|
@ -23,7 +23,7 @@ func defaultOpts() *opts {
|
|||
return new(opts)
|
||||
}
|
||||
|
||||
// TryNotaryInvoke returns option to enable
|
||||
// TryNotary returns option to enable
|
||||
// notary invocation tries.
|
||||
func TryNotary() Option {
|
||||
return func(o *opts) {
|
||||
|
|
|
@ -37,7 +37,7 @@ func defaultStaticOpts() *staticOpts {
|
|||
return new(staticOpts)
|
||||
}
|
||||
|
||||
// TryNotaryInvoke returns option to enable
|
||||
// TryNotary returns option to enable
|
||||
// notary invocation tries.
|
||||
func TryNotary() StaticClientOption {
|
||||
return func(o *staticOpts) {
|
||||
|
|
|
@ -90,14 +90,14 @@ func WithMaxPDPSleepInterval(dur time.Duration) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithPDPWorkerPool returns option to set worker pool for PDP pairs processing.
|
||||
// WithPDPWorkerPoolGenerator returns option to set worker pool for PDP pairs processing.
|
||||
func WithPDPWorkerPoolGenerator(f func() (util.WorkerPool, error)) Option {
|
||||
return func(c *cfg) {
|
||||
c.pdpPoolGenerator = f
|
||||
}
|
||||
}
|
||||
|
||||
// WithPoRWorkerPool returns option to set worker pool for PoR SG processing.
|
||||
// WithPoRWorkerPoolGenerator returns option to set worker pool for PoR SG processing.
|
||||
func WithPoRWorkerPoolGenerator(f func() (util.WorkerPool, error)) Option {
|
||||
return func(c *cfg) {
|
||||
c.porPoolGenerator = f
|
||||
|
|
|
@ -73,7 +73,7 @@ type Writer interface {
|
|||
io.Closer
|
||||
}
|
||||
|
||||
// IteratorProvider is a group of methods provided
|
||||
// WriterProvider is a group of methods provided
|
||||
// by entity which generates keepers of
|
||||
// UsedSpaceAnnouncement values.
|
||||
type WriterProvider interface {
|
||||
|
|
|
@ -29,7 +29,7 @@ func WithNextService(v objectSvc.ServiceServer) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithEACLValidator returns options to set eACL validator options.
|
||||
// WithEACLValidatorOptions returns options to set eACL validator options.
|
||||
func WithEACLValidatorOptions(v ...eacl.Option) Option {
|
||||
return func(c *cfg) {
|
||||
c.eACLOpts = v
|
||||
|
|
|
@ -86,14 +86,14 @@ func WithHeadService(h *getsvc.Service) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithClientCache returns option to set cache of remote node clients.
|
||||
// WithSearchService returns option to set search service.
|
||||
func WithSearchService(s *searchsvc.Service) Option {
|
||||
return func(c *cfg) {
|
||||
c.searcher = (*searchSvcWrapper)(s)
|
||||
}
|
||||
}
|
||||
|
||||
// WithClientOptions returns option to specify options of remote node clients.
|
||||
// WithPutService returns option to specify put service.
|
||||
func WithPutService(p *putsvc.Service) Option {
|
||||
return func(c *cfg) {
|
||||
c.placer = (*putSvcWrapper)(p)
|
||||
|
|
|
@ -34,7 +34,7 @@ func NewService(opts ...Option) *Service {
|
|||
}
|
||||
}
|
||||
|
||||
// Get calls internal service and returns v2 object stream.
|
||||
// Search calls internal service and returns v2 object stream.
|
||||
func (s *Service) Search(req *objectV2.SearchRequest, stream objectSvc.SearchStream) error {
|
||||
p, err := s.toPrm(req, stream)
|
||||
if err != nil {
|
||||
|
|
|
@ -100,7 +100,7 @@ func (a *AccessIdentifiers) Parent() *objectSDK.Object {
|
|||
return nil
|
||||
}
|
||||
|
||||
// WithParentID returns AccessIdentifiers with passed parent identifier.
|
||||
// WithParent returns AccessIdentifiers with passed parent identifier.
|
||||
func (a *AccessIdentifiers) WithParent(v *objectSDK.Object) *AccessIdentifiers {
|
||||
res := a
|
||||
if res == nil {
|
||||
|
|
|
@ -65,7 +65,7 @@ func (x *Storage) AllDaughterTrusts(epoch uint64) (*DaughterStorage, bool) {
|
|||
return s, ok
|
||||
}
|
||||
|
||||
// maps IDs of daughter peers to repositories of the local trusts to their providers.
|
||||
// DaughterStorage maps IDs of daughter peers to repositories of the local trusts to their providers.
|
||||
type DaughterStorage struct {
|
||||
mtx sync.RWMutex
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ type ClientMessageStreamer struct {
|
|||
close util.ClientStreamCloser
|
||||
}
|
||||
|
||||
// Recv calls send method of internal streamer.
|
||||
// Send calls send method of internal streamer.
|
||||
func (s *ClientMessageStreamer) Send(req interface{}) error {
|
||||
if err := s.send(req); err != nil {
|
||||
return fmt.Errorf("(%T) could not send the request: %w", s, err)
|
||||
|
|
|
@ -132,7 +132,7 @@ func (db *DB) Put(key locodedb.Key, rec locodedb.Record) error {
|
|||
|
||||
var errRecordNotFound = errors.New("record not found")
|
||||
|
||||
// Put reads the record by key from underlying BoltDB instance.
|
||||
// Get reads the record by key from underlying BoltDB instance.
|
||||
//
|
||||
// Returns an error if no record is presented by key in DB.
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue