Continue rebranding effort #43

Merged
realloc merged 8 commits from fix/1_rebranding into master 2023-02-06 14:41:15 +00:00
15 changed files with 48 additions and 45 deletions
Showing only changes of commit 5049a9a33c - Show all commits

View file

@ -34,7 +34,7 @@ func (x BalanceOfRes) Balance() accounting.Decimal {
return x.cliRes.Amount() return x.cliRes.Amount()
} }
// BalanceOf requests the current balance of a NeoFS user. // BalanceOf requests the current balance of a FrostFS user.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func BalanceOf(prm BalanceOfPrm) (res BalanceOfRes, err error) { func BalanceOf(prm BalanceOfPrm) (res BalanceOfRes, err error) {
@ -59,7 +59,7 @@ func (x ListContainersRes) IDList() []cid.ID {
return x.cliRes.Containers() return x.cliRes.Containers()
} }
// ListContainers requests a list of NeoFS user's containers. // ListContainers requests a list of FrostFS user's containers.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func ListContainers(prm ListContainersPrm) (res ListContainersRes, err error) { func ListContainers(prm ListContainersPrm) (res ListContainersRes, err error) {
@ -84,7 +84,7 @@ func (x PutContainerRes) ID() cid.ID {
return x.cnr return x.cnr
} }
// PutContainer sends a request to save the container in NeoFS. // PutContainer sends a request to save the container in FrostFS.
// //
// Operation is asynchronous and not guaranteed even in the absence of errors. // Operation is asynchronous and not guaranteed even in the absence of errors.
// The required time is also not predictable. // The required time is also not predictable.
@ -122,7 +122,7 @@ func (x GetContainerRes) Container() containerSDK.Container {
return x.cliRes.Container() return x.cliRes.Container()
} }
// GetContainer reads a container from NeoFS by ID. // GetContainer reads a container from FrostFS by ID.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func GetContainer(prm GetContainerPrm) (res GetContainerRes, err error) { func GetContainer(prm GetContainerPrm) (res GetContainerRes, err error) {
@ -140,7 +140,7 @@ func IsACLExtendable(c *client.Client, cnr cid.ID) (bool, error) {
res, err := GetContainer(prm) res, err := GetContainer(prm)
if err != nil { if err != nil {
return false, fmt.Errorf("get container from the NeoFS: %w", err) return false, fmt.Errorf("get container from the FrostFS: %w", err)
} }
return res.Container().BasicACL().Extendable(), nil return res.Container().BasicACL().Extendable(), nil
@ -155,7 +155,7 @@ type DeleteContainerPrm struct {
// DeleteContainerRes groups the resulting values of DeleteContainer operation. // DeleteContainerRes groups the resulting values of DeleteContainer operation.
type DeleteContainerRes struct{} type DeleteContainerRes struct{}
// DeleteContainer sends a request to remove a container from NeoFS by ID. // DeleteContainer sends a request to remove a container from FrostFS by ID.
// //
// Operation is asynchronous and not guaranteed even in the absence of errors. // Operation is asynchronous and not guaranteed even in the absence of errors.
// The required time is also not predictable. // The required time is also not predictable.
@ -185,7 +185,7 @@ func (x EACLRes) EACL() eacl.Table {
return x.cliRes.Table() return x.cliRes.Table()
} }
// EACL reads eACL table from NeoFS by container ID. // EACL reads eACL table from FrostFS by container ID.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func EACL(prm EACLPrm) (res EACLRes, err error) { func EACL(prm EACLPrm) (res EACLRes, err error) {
@ -203,7 +203,7 @@ type SetEACLPrm struct {
// SetEACLRes groups the resulting values of SetEACL operation. // SetEACLRes groups the resulting values of SetEACL operation.
type SetEACLRes struct{} type SetEACLRes struct{}
// SetEACL requests to save an eACL table in NeoFS. // SetEACL requests to save an eACL table in FrostFS.
// //
// Operation is asynchronous and no guaranteed even in the absence of errors. // Operation is asynchronous and no guaranteed even in the absence of errors.
// The required time is also not predictable. // The required time is also not predictable.
@ -228,12 +228,12 @@ type NetworkInfoRes struct {
cliRes *client.ResNetworkInfo cliRes *client.ResNetworkInfo
} }
// NetworkInfo returns structured information about the NeoFS network. // NetworkInfo returns structured information about the FrostFS network.
func (x NetworkInfoRes) NetworkInfo() netmap.NetworkInfo { func (x NetworkInfoRes) NetworkInfo() netmap.NetworkInfo {
return x.cliRes.Info() return x.cliRes.Info()
} }
// NetworkInfo reads information about the NeoFS network. // NetworkInfo reads information about the FrostFS network.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func NetworkInfo(prm NetworkInfoPrm) (res NetworkInfoRes, err error) { func NetworkInfo(prm NetworkInfoPrm) (res NetworkInfoRes, err error) {
@ -258,12 +258,12 @@ func (x NodeInfoRes) NodeInfo() netmap.NodeInfo {
return x.cliRes.NodeInfo() return x.cliRes.NodeInfo()
} }
// LatestVersion returns the latest NeoFS API version in use. // LatestVersion returns the latest FrostFS API version in use.
func (x NodeInfoRes) LatestVersion() version.Version { func (x NodeInfoRes) LatestVersion() version.Version {
return x.cliRes.LatestVersion() return x.cliRes.LatestVersion()
} }
// NodeInfo requests information about the remote server from NeoFS netmap. // NodeInfo requests information about the remote server from FrostFS netmap.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func NodeInfo(prm NodeInfoPrm) (res NodeInfoRes, err error) { func NodeInfo(prm NodeInfoPrm) (res NodeInfoRes, err error) {
@ -282,7 +282,7 @@ type NetMapSnapshotRes struct {
cliRes *client.ResNetMapSnapshot cliRes *client.ResNetMapSnapshot
} }
// NetMap returns current local snapshot of the NeoFS network map. // NetMap returns current local snapshot of the FrostFS network map.
func (x NetMapSnapshotRes) NetMap() netmap.NetMap { func (x NetMapSnapshotRes) NetMap() netmap.NetMap {
return x.cliRes.NetMap() return x.cliRes.NetMap()
} }
@ -362,7 +362,7 @@ func (x PutObjectRes) ID() oid.ID {
return x.id return x.id
} }
// PutObject saves the object in NeoFS network. // PutObject saves the object in FrostFS network.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func PutObject(prm PutObjectPrm) (*PutObjectRes, error) { func PutObject(prm PutObjectPrm) (*PutObjectRes, error) {
@ -460,7 +460,7 @@ func (x DeleteObjectRes) Tombstone() oid.ID {
return x.tomb return x.tomb
} }
// DeleteObject marks an object to be removed from NeoFS through tombstone placement. // DeleteObject marks an object to be removed from FrostFS through tombstone placement.
// //
// Returns any error which prevented the operation from completing correctly in error return. // Returns any error which prevented the operation from completing correctly in error return.
func DeleteObject(prm DeleteObjectPrm) (*DeleteObjectRes, error) { func DeleteObject(prm DeleteObjectPrm) (*DeleteObjectRes, error) {
@ -576,7 +576,7 @@ type HeadObjectPrm struct {
mainOnly bool mainOnly bool
} }
// SetMainOnlyFlag sets flag to get only main fields of an object header in terms of NeoFS API. // SetMainOnlyFlag sets flag to get only main fields of an object header in terms of FrostFS API.
func (x *HeadObjectPrm) SetMainOnlyFlag(v bool) { func (x *HeadObjectPrm) SetMainOnlyFlag(v bool) {
x.mainOnly = v x.mainOnly = v
} }
@ -812,7 +812,7 @@ func (x *PayloadRangePrm) SetRange(rng *object.Range) {
// PayloadRangeRes groups the resulting values of PayloadRange operation. // PayloadRangeRes groups the resulting values of PayloadRange operation.
type PayloadRangeRes struct{} type PayloadRangeRes struct{}
// PayloadRange reads object payload range from NeoFS and writes it to the specified writer. // PayloadRange reads object payload range from FrostFS and writes it to the specified writer.
// //
// Interrupts on any writer error. // Interrupts on any writer error.
// //
@ -872,7 +872,7 @@ func (s *SyncContainerPrm) SetContainer(c *containerSDK.Container) {
// operation. // operation.
type SyncContainerRes struct{} type SyncContainerRes struct{}
// SyncContainerSettings reads global network config from NeoFS and // SyncContainerSettings reads global network config from FrostFS and
// syncs container settings with it. // syncs container settings with it.
// //
// Interrupts on any writer error. // Interrupts on any writer error.

View file

@ -1,12 +1,15 @@
// Package internal provides functionality for NeoFS CLI application communication with NeoFS network. // Package internal provides functionality for FrostFS CLI application
// communication with FrostFS network.
// //
// The base client for accessing remote nodes via NeoFS API is a NeoFS SDK Go API client. // The base client for accessing remote nodes via FrostFS API is a FrostFS SDK
// However, although it encapsulates a useful piece of business logic (e.g. the signature mechanism), // Go API client. However, although it encapsulates a useful piece of business
// the NeoFS CLI application does not fully use the client's flexible interface. // logic (e.g. the signature mechanism), the FrostFS CLI application does not
// fully use the client's flexible interface.
// //
// In this regard, this package provides functions over base API client necessary for the application. // In this regard, this package provides functions over base API client
// This allows you to concentrate the entire spectrum of the client's use in one place (this will be convenient // necessary for the application. This allows you to concentrate the entire
// both when updating the base client and for evaluating the UX of SDK library). So it is expected that all // spectrum of the client's use in one place (this will be convenient both when
// application packages will be limited to this package for the development of functionality requiring // updating the base client and for evaluating the UX of SDK library). So it is
// NeoFS API communication. // expected that all application packages will be limited to this package for
// the development of functionality requiring FrostFS API communication.
package internal package internal

View file

@ -16,7 +16,7 @@ type commonPrm struct {
cli *client.Client cli *client.Client
} }
// SetClient sets the base client for NeoFS API communication. // SetClient sets the base client for FrostFS API communication.
func (x *commonPrm) SetClient(cli *client.Client) { func (x *commonPrm) SetClient(cli *client.Client) {
x.cli = cli x.cli = cli
} }

View file

@ -31,7 +31,7 @@ func ReadBearerToken(cmd *cobra.Command, flagname string) *bearer.Token {
} }
// BinaryOrJSON is an interface of entities which provide json.Unmarshaler // BinaryOrJSON is an interface of entities which provide json.Unmarshaler
// and NeoFS binary decoder. // and FrostFS binary decoder.
type BinaryOrJSON interface { type BinaryOrJSON interface {
Unmarshal([]byte) error Unmarshal([]byte) error
json.Unmarshaler json.Unmarshaler

View file

@ -8,8 +8,8 @@ import (
const SessionToken = "session" const SessionToken = "session"
// InitSession registers SessionToken flag representing filepath to the token // InitSession registers SessionToken flag representing file path to the token of
// of the session with the given name. Supports NeoFS-binary and JSON files. // the session with the given name. Supports FrostFS-binary and JSON files.
func InitSession(cmd *cobra.Command, name string) { func InitSession(cmd *cobra.Command, name string) {
cmd.Flags().String( cmd.Flags().String(
SessionToken, SessionToken,

View file

@ -37,7 +37,7 @@ var netInfoCmd = &cobra.Command{
const format = " %s: %v\n" const format = " %s: %v\n"
cmd.Println("NeoFS network configuration (system)") cmd.Println("FrostFS network configuration (system)")
cmd.Printf(format, "Audit fee", netInfo.AuditFee()) cmd.Printf(format, "Audit fee", netInfo.AuditFee())
cmd.Printf(format, "Storage price", netInfo.StoragePrice()) cmd.Printf(format, "Storage price", netInfo.StoragePrice())
cmd.Printf(format, "Container fee", netInfo.ContainerFee()) cmd.Printf(format, "Container fee", netInfo.ContainerFee())
@ -50,7 +50,7 @@ var netInfoCmd = &cobra.Command{
cmd.Printf(format, "Homomorphic hashing disabled", netInfo.HomomorphicHashingDisabled()) cmd.Printf(format, "Homomorphic hashing disabled", netInfo.HomomorphicHashingDisabled())
cmd.Printf(format, "Maintenance mode allowed", netInfo.MaintenanceModeAllowed()) cmd.Printf(format, "Maintenance mode allowed", netInfo.MaintenanceModeAllowed())
cmd.Println("NeoFS network configuration (other)") cmd.Println("FrostFS network configuration (other)")
netInfo.IterateRawNetworkParameters(func(name string, value []byte) { netInfo.IterateRawNetworkParameters(func(name string, value []byte) {
cmd.Printf(format, name, hex.EncodeToString(value)) cmd.Printf(format, name, hex.EncodeToString(value))
}) })

View file

@ -86,7 +86,7 @@ var objectLockCmd = &cobra.Command{
prm.SetHeader(obj) prm.SetHeader(obj)
res, err := internalclient.PutObject(prm) res, err := internalclient.PutObject(prm)
commonCmd.ExitOnErr(cmd, "Store lock object in NeoFS: %w", err) commonCmd.ExitOnErr(cmd, "Store lock object in FrostFS: %w", err)
cmd.Printf("Lock object ID: %s\n", res.ID()) cmd.Printf("Lock object ID: %s\n", res.ID())
cmd.Println("Objects successfully locked.") cmd.Println("Objects successfully locked.")

View file

@ -274,7 +274,7 @@ func OpenSessionViaClient(cmd *cobra.Command, dst SessionPrm, cli *client.Client
var tok session.Object var tok session.Object
const sessionLifetime = 10 // in NeoFS epochs const sessionLifetime = 10 // in FrostFS epochs
common.PrintVerbose(cmd, "Opening remote session with the node...") common.PrintVerbose(cmd, "Opening remote session with the node...")

View file

@ -81,7 +81,7 @@ func createSession(cmd *cobra.Command, _ []string) {
commonCmd.ExitOnErr(cmd, "can't write token to file: %w", err) commonCmd.ExitOnErr(cmd, "can't write token to file: %w", err)
} }
// CreateSession opens a new communication with NeoFS storage node using client connection. // CreateSession opens a new communication with FrostFS storage node using client connection.
// The session is expected to be maintained by the storage node during the given // The session is expected to be maintained by the storage node during the given
// number of epochs. // number of epochs.
// //

View file

@ -849,8 +849,8 @@ func (c *cfg) LocalNodeInfo() (*netmapV2.NodeInfo, error) {
return &res, nil return &res, nil
} }
// handleLocalNodeInfo rewrites local node info from the NeoFS network map. // handleLocalNodeInfo rewrites local node info from the FrostFS network map.
// Called with nil when storage node is outside the NeoFS network map // Called with nil when storage node is outside the FrostFS network map
// (before entering the network and after leaving it). // (before entering the network and after leaving it).
func (c *cfg) handleLocalNodeInfo(ni *netmap.NodeInfo) { func (c *cfg) handleLocalNodeInfo(ni *netmap.NodeInfo) {
c.cfgNetmap.state.setNodeInfo(ni) c.cfgNetmap.state.setNodeInfo(ni)

View file

@ -59,7 +59,7 @@ func initControlService(c *cfg) {
c.cfgControlService.server = grpc.NewServer() c.cfgControlService.server = grpc.NewServer()
c.onShutdown(func() { c.onShutdown(func() {
stopGRPC("NeoFS Control API", c.cfgControlService.server, c.log) stopGRPC("FrostFS Control API", c.cfgControlService.server, c.log)
}) })
control.RegisterControlServiceServer(c.cfgControlService.server, ctlSvc) control.RegisterControlServiceServer(c.cfgControlService.server, ctlSvc)

View file

@ -65,7 +65,7 @@ func initGRPC(c *cfg) {
srv := grpc.NewServer(serverOpts...) srv := grpc.NewServer(serverOpts...)
c.onShutdown(func() { c.onShutdown(func() {
stopGRPC("NeoFS Public API", srv, c.log) stopGRPC("FrostFS Public API", srv, c.log)
}) })
c.cfgGRPC.servers = append(c.cfgGRPC.servers, srv) c.cfgGRPC.servers = append(c.cfgGRPC.servers, srv)

View file

@ -117,7 +117,7 @@ func initNotifications(c *cfg) {
} }
natsSvc := nats.New( natsSvc := nats.New(
nats.WithConnectionName("NeoFS Storage Node: "+pubKey), // connection name is used in the server side logs nats.WithConnectionName("FrostFS Storage Node: "+pubKey), // connection name is used in the server side logs
nats.WithTimeout(nodeconfig.Notification(c.appCfg).Timeout()), nats.WithTimeout(nodeconfig.Notification(c.appCfg).Timeout()),
nats.WithClientCert( nats.WithClientCert(
nodeconfig.Notification(c.appCfg).CertPath(), nodeconfig.Notification(c.appCfg).CertPath(),

View file

@ -15,7 +15,7 @@ type commonPrm struct {
ctx context.Context ctx context.Context
} }
// SetClient sets the base client for NeoFS API communication. // SetClient sets the base client for FrostFS API communication.
// //
// Required parameter. // Required parameter.
func (x *commonPrm) SetClient(cli coreclient.Client) { func (x *commonPrm) SetClient(cli coreclient.Client) {

View file

@ -1,5 +1,5 @@
// Package internal provides functionality for NeoFS Node Reputation system communication with NeoFS network. // Package internal provides functionality for FrostFS Node Reputation system communication with FrostFS network.
// The base client for accessing remote nodes via NeoFS API is a NeoFS SDK Go API client. // 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), // However, although it encapsulates a useful piece of business logic (e.g. the signature mechanism),
// the Reputation service does not fully use the client's flexible interface. // the Reputation 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 // 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 // both when updating the base client and for evaluating the UX of SDK library). So, it is expected that all
// Reputation service packages will be limited to this package for the development of functionality requiring // Reputation service packages will be limited to this package for the development of functionality requiring
// NeoFS API communication. // FrostFS API communication.
package internal package internal