forked from TrueCloudLab/frostfs-node
[#1] Fix comments and error messages
Signed-off-by: Stanislav Bogatyrev <s.bogatyrev@yadro.com>
This commit is contained in:
parent
c761a95eef
commit
cb016d53a6
96 changed files with 167 additions and 167 deletions
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-api-go/v2/accounting"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API Accounting service server.
|
||||
// Server is an interface of the FrostFS API Accounting service server.
|
||||
type Server interface {
|
||||
Balance(context.Context, *accounting.BalanceRequest) (*accounting.BalanceResponse, error)
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-sdk-go/netmap"
|
||||
)
|
||||
|
||||
// PlacementBuilder describes interface of NeoFS placement calculator.
|
||||
// PlacementBuilder describes interface of FrostFS placement calculator.
|
||||
type PlacementBuilder interface {
|
||||
// BuildPlacement must compose and sort (according to a specific algorithm)
|
||||
// storage nodes from the container by its identifier using network map
|
||||
|
|
|
@ -27,8 +27,8 @@ type Reader interface {
|
|||
containercore.EACLSource
|
||||
|
||||
// List returns a list of container identifiers belonging
|
||||
// to the specified user of NeoFS system. Returns the identifiers
|
||||
// of all NeoFS containers if pointer to owner identifier is nil.
|
||||
// to the specified user of FrostFS system. Returns the identifiers
|
||||
// of all FrostFS containers if pointer to owner identifier is nil.
|
||||
List(*user.ID) ([]cid.ID, error)
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-api-go/v2/container"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API Container service server.
|
||||
// Server is an interface of the FrostFS API Container service server.
|
||||
type Server interface {
|
||||
Put(context.Context, *container.PutRequest) (*container.PutResponse, error)
|
||||
Get(context.Context, *container.GetRequest) (*container.GetResponse, error)
|
||||
|
|
|
@ -24,7 +24,7 @@ type executorSvc struct {
|
|||
// about current node state.
|
||||
type NodeState interface {
|
||||
// Must return current node state
|
||||
// in NeoFS API v2 NodeInfo structure.
|
||||
// in FrostFS API v2 NodeInfo structure.
|
||||
LocalNodeInfo() (*netmap.NodeInfo, error)
|
||||
|
||||
// ReadCurrentNetMap reads current local network map of the storage node
|
||||
|
@ -34,9 +34,9 @@ type NodeState interface {
|
|||
}
|
||||
|
||||
// NetworkInfo encapsulates source of the
|
||||
// recent information about the NeoFS network.
|
||||
// recent information about the FrostFS network.
|
||||
type NetworkInfo interface {
|
||||
// Must return recent network information in NeoFS API v2 NetworkInfo structure.
|
||||
// Must return recent network information in FrostFS API v2 NetworkInfo structure.
|
||||
//
|
||||
// If protocol version is <=2.9, MillisecondsPerBlock and network config should be unset.
|
||||
Dump(versionsdk.Version) (*netmapSDK.NetworkInfo, error)
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-api-go/v2/netmap"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API Netmap service server.
|
||||
// Server is an interface of the FrostFS API Netmap service server.
|
||||
type Server interface {
|
||||
LocalNodeInfo(context.Context, *netmap.LocalNodeInfoRequest) (*netmap.LocalNodeInfoResponse, error)
|
||||
NetworkInfo(context.Context, *netmap.NetworkInfoRequest) (*netmap.NetworkInfoResponse, error)
|
||||
|
|
|
@ -98,7 +98,7 @@ func (c *Checker) CheckBasicACL(info v2.RequestInfo) bool {
|
|||
|
||||
// StickyBitCheck validates owner field in the request if sticky bit is enabled.
|
||||
func (c *Checker) StickyBitCheck(info v2.RequestInfo, owner user.ID) bool {
|
||||
// According to NeoFS specification sticky bit has no effect on system nodes
|
||||
// According to FrostFS specification sticky bit has no effect on system nodes
|
||||
// for correct intra-container work with objects (in particular, replication).
|
||||
if info.RequestRole() == acl.RoleContainer {
|
||||
return true
|
||||
|
|
|
@ -192,9 +192,9 @@ func assertVerb(tok sessionSDK.Object, op acl.Op) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// assertSessionRelation checks if given token describing the NeoFS session
|
||||
// assertSessionRelation checks if given token describing the FrostFS session
|
||||
// relates to the given container and optional object. Missing object
|
||||
// means that the context isn't bound to any NeoFS object in the container.
|
||||
// means that the context isn't bound to any FrostFS object in the container.
|
||||
// Returns no error iff relation is correct. Criteria:
|
||||
//
|
||||
// session is bound to the given container
|
||||
|
|
|
@ -26,7 +26,7 @@ type NetworkInfo interface {
|
|||
netmap.State
|
||||
|
||||
// Must return the lifespan of the tombstones
|
||||
// in the NeoFS epochs.
|
||||
// in the FrostFS epochs.
|
||||
TombstoneLifetime() (uint64, error)
|
||||
|
||||
// Returns user ID of the local storage node. Result must not be nil.
|
||||
|
|
|
@ -91,7 +91,7 @@ func (s *Service) GetRangeHash(ctx context.Context, req *objectV2.GetRangeHashRe
|
|||
return toHashResponse(req.GetBody().GetType(), res), nil
|
||||
}
|
||||
|
||||
// Head serves NeoFS API v2 compatible HEAD requests.
|
||||
// Head serves ForstFS API v2 compatible HEAD requests.
|
||||
func (s *Service) Head(ctx context.Context, req *objectV2.HeadRequest) (*objectV2.HeadResponse, error) {
|
||||
resp := new(objectV2.HeadResponse)
|
||||
resp.SetBody(new(objectV2.HeadResponseBody))
|
||||
|
|
|
@ -34,7 +34,7 @@ type commonPrm struct {
|
|||
xHeaders []string
|
||||
}
|
||||
|
||||
// SetClient sets base client for NeoFS API communication.
|
||||
// SetClient sets base client for ForstFS API communication.
|
||||
//
|
||||
// Required parameter.
|
||||
func (x *commonPrm) SetClient(cli coreclient.Client) {
|
||||
|
@ -260,7 +260,7 @@ func HeadObject(prm HeadObjectPrm) (*HeadObjectRes, error) {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("read object header from NeoFS: %w", err)
|
||||
return nil, fmt.Errorf("read object header from FrostFS: %w", err)
|
||||
}
|
||||
|
||||
var hdr object.Object
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Package internal provides functionality for NeoFS Node Object service communication with NeoFS network.
|
||||
// The base client for accessing remote nodes via NeoFS API is a NeoFS SDK Go API client.
|
||||
// Package internal provides functionality for FrostFS Node Object service communication with FrostFS network.
|
||||
// The base client for accessing remote nodes via FrostFS API is a FrostFS SDK Go API client.
|
||||
// However, although it encapsulates a useful piece of business logic (e.g. the signature mechanism),
|
||||
// the Object service does not fully use the client's flexible interface.
|
||||
//
|
||||
|
@ -7,5 +7,5 @@
|
|||
// This allows you to concentrate the entire spectrum of the client's use in one place (this will be convenient
|
||||
// both when updating the base client and for evaluating the UX of SDK library). So it is expected that all
|
||||
// Object service packages will be limited to this package for the development of functionality requiring
|
||||
// NeoFS API communication.
|
||||
// FrostFS API communication.
|
||||
package internal
|
||||
|
|
|
@ -7,25 +7,25 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-node/pkg/services/util"
|
||||
)
|
||||
|
||||
// GetObjectStream is an interface of NeoFS API v2 compatible object streamer.
|
||||
// GetObjectStream is an interface of FrostFS API v2 compatible object streamer.
|
||||
type GetObjectStream interface {
|
||||
util.ServerStream
|
||||
Send(*object.GetResponse) error
|
||||
}
|
||||
|
||||
// GetObjectRangeStream is an interface of NeoFS API v2 compatible payload range streamer.
|
||||
// GetObjectRangeStream is an interface of FrostFS API v2 compatible payload range streamer.
|
||||
type GetObjectRangeStream interface {
|
||||
util.ServerStream
|
||||
Send(*object.GetRangeResponse) error
|
||||
}
|
||||
|
||||
// SearchStream is an interface of NeoFS API v2 compatible search streamer.
|
||||
// SearchStream is an interface of FrostFS API v2 compatible search streamer.
|
||||
type SearchStream interface {
|
||||
util.ServerStream
|
||||
Send(*object.SearchResponse) error
|
||||
}
|
||||
|
||||
// PutObjectStream is an interface of NeoFS API v2 compatible client's object streamer.
|
||||
// PutObjectStream is an interface of FrostFS API v2 compatible client's object streamer.
|
||||
type PutObjectStream interface {
|
||||
Send(*object.PutRequest) error
|
||||
CloseAndRecv() (*object.PutResponse, error)
|
||||
|
|
|
@ -41,7 +41,7 @@ func NewKeyStorage(localKey *ecdsa.PrivateKey, tokenStore SessionSource, net net
|
|||
}
|
||||
}
|
||||
|
||||
// SessionInfo groups information about NeoFS Object session
|
||||
// SessionInfo groups information about FrostFS Object session
|
||||
// which is reflected in KeyStorage.
|
||||
type SessionInfo struct {
|
||||
// Session unique identifier.
|
||||
|
|
|
@ -67,7 +67,7 @@ func (g *ExpirationChecker) IsTombstoneAvailable(ctx context.Context, a oid.Addr
|
|||
}
|
||||
|
||||
// requested tombstone not
|
||||
// found in the NeoFS network
|
||||
// found in the FrostFS network
|
||||
return false
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
)
|
||||
|
||||
// Source represents wrapper over the object service that
|
||||
// allows checking if a tombstone is available in NeoFS
|
||||
// allows checking if a tombstone is available in FrostFS
|
||||
// network.
|
||||
//
|
||||
// Must be created via NewSource function. `var` and `Source{}`
|
||||
|
|
|
@ -248,11 +248,11 @@ func (p *Policer) processNodes(ctx *processPlacementContext, addrWithType object
|
|||
}
|
||||
}
|
||||
|
||||
// isClientErrMaintenance checks if err corresponds to NeoFS status return
|
||||
// isClientErrMaintenance checks if err corresponds to FrostFS status return
|
||||
// which tells that node is currently under maintenance. Supports wrapped
|
||||
// errors.
|
||||
//
|
||||
// Similar to client.IsErr___ errors, consider replacing to NeoFS SDK.
|
||||
// Similar to client.IsErr___ errors, consider replacing to FrostFS SDK.
|
||||
func isClientErrMaintenance(err error) bool {
|
||||
switch unwrapErr(err).(type) {
|
||||
default:
|
||||
|
|
|
@ -210,7 +210,7 @@ func WithPool(p *ants.Pool) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithNodeLoader returns option to set NeoFS node load source.
|
||||
// WithNodeLoader returns option to set FrostFS node load source.
|
||||
func WithNodeLoader(l nodeLoader) Option {
|
||||
return func(c *cfg) {
|
||||
c.loader = l
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-api-go/v2/reputation"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API v2 Reputation service server.
|
||||
// Server is an interface of the FrostFS API v2 Reputation service server.
|
||||
type Server interface {
|
||||
AnnounceLocalTrust(context.Context, *reputation.AnnounceLocalTrustRequest) (*reputation.AnnounceLocalTrustResponse, error)
|
||||
AnnounceIntermediateResult(context.Context, *reputation.AnnounceIntermediateResultRequest) (*reputation.AnnounceIntermediateResultResponse, error)
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-api-go/v2/session"
|
||||
)
|
||||
|
||||
// Server is an interface of the NeoFS API Session service server.
|
||||
// Server is an interface of the FrostFS API Session service server.
|
||||
type Server interface {
|
||||
Create(context.Context, *session.CreateRequest) (*session.CreateResponse, error)
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import (
|
|||
|
||||
type ContainerSource interface {
|
||||
container.Source
|
||||
// List must return list of all the containers in the NeoFS network
|
||||
// List must return list of all the containers in the FrostFS network
|
||||
// at the moment of a call and any error that does not allow fetching
|
||||
// container information.
|
||||
List() ([]cid.ID, error)
|
||||
|
|
|
@ -213,7 +213,7 @@ var errDENY = errors.New("DENY eACL rule")
|
|||
var errNoAllowRules = errors.New("not found allowing rules for the request")
|
||||
|
||||
// checkEACL searches for the eACL rules that could be applied to the request
|
||||
// (a tuple of a signer key, his NeoFS role and a request operation).
|
||||
// (a tuple of a signer key, his FrostFS role and a request operation).
|
||||
// It does not filter the request by the filters of the eACL table since tree
|
||||
// requests do not contain any "object" information that could be filtered and,
|
||||
// therefore, filtering leads to unexpected results.
|
||||
|
|
|
@ -27,7 +27,7 @@ message LogMove {
|
|||
|
||||
// Signature of a message.
|
||||
message Signature {
|
||||
// Serialized public key as defined in NeoFS API.
|
||||
// Serialized public key as defined in FrostFS API.
|
||||
bytes key = 1 [json_name = "key"];
|
||||
// Signature of a message body.
|
||||
bytes sign = 2 [json_name = "signature"];
|
||||
|
|
|
@ -15,7 +15,7 @@ type RequestMessage interface {
|
|||
GetMetaHeader() *session.RequestMetaHeader
|
||||
}
|
||||
|
||||
// ResponseMessage is an interface of NeoFS response message.
|
||||
// ResponseMessage is an interface of FrostFS response message.
|
||||
type ResponseMessage interface {
|
||||
GetMetaHeader() *session.ResponseMetaHeader
|
||||
SetMetaHeader(*session.ResponseMetaHeader)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue