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
|
@ -32,7 +32,7 @@ func (f FeeConfig) SideChainFee() fixedn.Fixed8 {
|
|||
return f.sidechain
|
||||
}
|
||||
|
||||
// NamedContainerRegistrationFee returns additional GAS fee for named container registration in NeoFS network.
|
||||
// NamedContainerRegistrationFee returns additional GAS fee for named container registration in FrostFS network.
|
||||
func (f FeeConfig) NamedContainerRegistrationFee() fixedn.Fixed8 {
|
||||
return f.registerNamedCnr
|
||||
}
|
||||
|
|
|
@ -16,14 +16,14 @@ import (
|
|||
oid "github.com/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
||||
// Client represents NeoFS API client cut down to the needs of a purely IR application.
|
||||
// Client represents FrostFS API client cut down to the needs of a purely IR application.
|
||||
type Client struct {
|
||||
key *ecdsa.PrivateKey
|
||||
|
||||
c clientcore.Client
|
||||
}
|
||||
|
||||
// WrapBasicClient wraps a client.Client instance to use it for NeoFS API RPC.
|
||||
// WrapBasicClient wraps a client.Client instance to use it for FrostFS API RPC.
|
||||
func (x *Client) WrapBasicClient(c clientcore.Client) {
|
||||
x.c = c
|
||||
}
|
||||
|
@ -211,7 +211,7 @@ func (x Client) 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
|
||||
|
@ -225,7 +225,7 @@ func (x Client) HeadObject(prm HeadObjectPrm) (*HeadObjectRes, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
// GetObjectPayload reads an object by address from NeoFS via Client and returns its payload.
|
||||
// GetObjectPayload reads an object by address from FrostFS via Client and returns its payload.
|
||||
//
|
||||
// Returns any error which prevented the operation from completing correctly in error return.
|
||||
func GetObjectPayload(ctx context.Context, c Client, addr oid.Address) ([]byte, error) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Package frostfsapiclient provides functionality for IR application communication with NeoFS network.
|
||||
// Package frostfsapiclient provides functionality for IR application communication with FrostFS network.
|
||||
//
|
||||
// The basic client for accessing remote nodes via NeoFS API is a NeoFS SDK Go API client.
|
||||
// The basic 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 IR application does not fully use the client's flexible interface.
|
||||
//
|
||||
|
@ -8,5 +8,5 @@
|
|||
// The type provides the minimum interface necessary for the application and also 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 application packages will be limited
|
||||
// to this package for the development of functionality requiring NeoFS API communication.
|
||||
// to this package for the development of functionality requiring FrostFS API communication.
|
||||
package frostfsapiclient
|
||||
|
|
|
@ -81,7 +81,7 @@ func New(p *Params) (*Processor, error) {
|
|||
case p.ContainerClient == nil:
|
||||
return nil, errors.New("ir/container: Container client is not set")
|
||||
case p.FrostFSIDClient == nil:
|
||||
return nil, errors.New("ir/container: NeoFS ID client is not set")
|
||||
return nil, errors.New("ir/container: FrostFS ID client is not set")
|
||||
case p.NetworkState == nil:
|
||||
return nil, errors.New("ir/container: network state is not set")
|
||||
case p.SubnetClient == nil:
|
||||
|
|
|
@ -123,7 +123,7 @@ func (gp *Processor) processAlphabetSync(txHash util.Uint256) {
|
|||
}
|
||||
}
|
||||
|
||||
// 4. Update NeoFS contract in the mainnet.
|
||||
// 4. Update FrostFS contract in the mainnet.
|
||||
epoch := gp.epochState.EpochCounter()
|
||||
|
||||
buf := make([]byte, 8)
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
)
|
||||
|
||||
// Record is an interface of read-only
|
||||
// NeoFS LOCODE database single entry.
|
||||
// FrostFS LOCODE database single entry.
|
||||
type Record interface {
|
||||
// Must return ISO 3166-1 alpha-2
|
||||
// country code.
|
||||
|
@ -47,7 +47,7 @@ type Record interface {
|
|||
}
|
||||
|
||||
// DB is an interface of read-only
|
||||
// NeoFS LOCODE database.
|
||||
// FrostFS LOCODE database.
|
||||
type DB interface {
|
||||
// Must find the record that corresponds to
|
||||
// LOCODE and provides the Record interface.
|
||||
|
|
|
@ -6,7 +6,7 @@ package locode
|
|||
// Passing incorrect parameter values will result in constructor
|
||||
// failure (error or panic depending on the implementation).
|
||||
type Prm struct {
|
||||
// NeoFS LOCODE database interface.
|
||||
// FrostFS LOCODE database interface.
|
||||
//
|
||||
// Must not be nil.
|
||||
DB DB
|
||||
|
|
|
@ -15,7 +15,7 @@ import (
|
|||
// ErrMaintenanceModeDisallowed is returned when maintenance mode is disallowed.
|
||||
var ErrMaintenanceModeDisallowed = errors.New("maintenance mode is disallowed")
|
||||
|
||||
// NetworkSettings encapsulates current settings of the NeoFS network and
|
||||
// NetworkSettings encapsulates current settings of the FrostFS network and
|
||||
// provides interface used for processing the network map candidates.
|
||||
type NetworkSettings interface {
|
||||
// MaintenanceModeAllowed checks if maintenance state of the storage nodes
|
||||
|
@ -27,7 +27,7 @@ type NetworkSettings interface {
|
|||
}
|
||||
|
||||
// NetMapCandidateValidator represents tool which checks state of nodes which
|
||||
// are going to register in the NeoFS network (enter the network map).
|
||||
// are going to register in the FrostFS network (enter the network map).
|
||||
//
|
||||
// NetMapCandidateValidator can be instantiated using built-in var declaration
|
||||
// and currently doesn't require any additional initialization.
|
||||
|
|
|
@ -29,7 +29,7 @@ type ResultStorage interface {
|
|||
AuditResultsForEpoch(epoch uint64) ([]*audit.Result, error)
|
||||
}
|
||||
|
||||
// SGInfo groups the data about NeoFS storage group
|
||||
// SGInfo groups the data about FrostFS storage group
|
||||
// necessary for calculating audit fee.
|
||||
type SGInfo interface {
|
||||
// Must return sum size of the all group members.
|
||||
|
|
|
@ -17,7 +17,7 @@ type NodeInfo interface {
|
|||
PublicKey() []byte
|
||||
}
|
||||
|
||||
// ContainerInfo groups the data about NeoFS container
|
||||
// ContainerInfo groups the data about FrostFS container
|
||||
// necessary for calculating audit fee.
|
||||
type ContainerInfo interface {
|
||||
// Must return identifier of the container owner.
|
||||
|
@ -25,7 +25,7 @@ type ContainerInfo interface {
|
|||
}
|
||||
|
||||
// ContainerStorage is an interface of
|
||||
// storage of the NeoFS containers.
|
||||
// storage of the FrostFS containers.
|
||||
type ContainerStorage interface {
|
||||
// Must return information about the container by ID.
|
||||
ContainerInfo(cid.ID) (ContainerInfo, error)
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/TrueCloudLab/frostfs-sdk-go/user"
|
||||
)
|
||||
|
||||
// Put represents a notification about NeoFS subnet creation.
|
||||
// Put represents a notification about FrostFS subnet creation.
|
||||
// Generated by a contract when intending to create a subnet.
|
||||
type Put interface {
|
||||
// Contains the ID of the subnet to be created.
|
||||
|
@ -56,7 +56,7 @@ func (x PutValidator) Assert(event Put) error {
|
|||
}
|
||||
}
|
||||
|
||||
// read creator's user ID in NeoFS system
|
||||
// read creator's user ID in FrostFS system
|
||||
var creator user.ID
|
||||
if err = event.ReadCreator(&creator); err != nil {
|
||||
return fmt.Errorf("read creator: %w", err)
|
||||
|
|
|
@ -184,14 +184,14 @@ type putSubnetEvent struct {
|
|||
ev subnetevents.Put
|
||||
}
|
||||
|
||||
// ReadID unmarshals the subnet ID from a binary NeoFS API protocol's format.
|
||||
// ReadID unmarshals the subnet ID from a binary FrostFS API protocol's format.
|
||||
func (x putSubnetEvent) ReadID(id *subnetid.ID) error {
|
||||
return id.Unmarshal(x.ev.ID())
|
||||
}
|
||||
|
||||
var errMissingSubnetOwner = errors.New("missing subnet owner")
|
||||
|
||||
// ReadCreator unmarshals the subnet creator from a binary NeoFS API protocol's format.
|
||||
// ReadCreator unmarshals the subnet creator from a binary FrostFS API protocol's format.
|
||||
// Returns an error if the byte array is empty.
|
||||
func (x putSubnetEvent) ReadCreator(id *user.ID) error {
|
||||
data := x.ev.Owner()
|
||||
|
@ -210,7 +210,7 @@ func (x putSubnetEvent) ReadCreator(id *user.ID) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// ReadInfo unmarshal the subnet info from a binary NeoFS API protocol's format.
|
||||
// ReadInfo unmarshal the subnet info from a binary FrostFS API protocol's format.
|
||||
func (x putSubnetEvent) ReadInfo(info *subnet.Info) error {
|
||||
return info.Unmarshal(x.ev.Info())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue