From f825cfac78fafe37f768eff020fc49bd58b1a639 Mon Sep 17 00:00:00 2001 From: Stanislav Bogatyrev Date: Fri, 3 Feb 2023 19:29:25 +0300 Subject: [PATCH] [#1] Fix project name in comments here and there Signed-off-by: Stanislav Bogatyrev --- cmd/frostfs-cli/internal/client/client.go | 36 +++++++++---------- cmd/frostfs-cli/internal/client/doc.go | 21 ++++++----- cmd/frostfs-cli/internal/client/prm.go | 2 +- cmd/frostfs-cli/internal/common/token.go | 2 +- .../internal/commonflags/session.go | 4 +-- cmd/frostfs-cli/modules/netmap/netinfo.go | 4 +-- cmd/frostfs-cli/modules/object/lock.go | 2 +- cmd/frostfs-cli/modules/object/util.go | 2 +- cmd/frostfs-cli/modules/session/create.go | 2 +- cmd/frostfs-node/config.go | 4 +-- cmd/frostfs-node/control.go | 2 +- cmd/frostfs-node/grpc.go | 2 +- cmd/frostfs-node/notificator.go | 2 +- .../reputation/internal/client/client.go | 2 +- .../reputation/internal/client/doc.go | 6 ++-- 15 files changed, 48 insertions(+), 45 deletions(-) diff --git a/cmd/frostfs-cli/internal/client/client.go b/cmd/frostfs-cli/internal/client/client.go index 37781572..fcfa2b46 100644 --- a/cmd/frostfs-cli/internal/client/client.go +++ b/cmd/frostfs-cli/internal/client/client.go @@ -34,7 +34,7 @@ func (x BalanceOfRes) Balance() accounting.Decimal { 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. func BalanceOf(prm BalanceOfPrm) (res BalanceOfRes, err error) { @@ -59,7 +59,7 @@ func (x ListContainersRes) IDList() []cid.ID { 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. func ListContainers(prm ListContainersPrm) (res ListContainersRes, err error) { @@ -84,7 +84,7 @@ func (x PutContainerRes) ID() cid.ID { 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. // The required time is also not predictable. @@ -122,7 +122,7 @@ func (x GetContainerRes) Container() containerSDK.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. 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) 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 @@ -155,7 +155,7 @@ type DeleteContainerPrm struct { // DeleteContainerRes groups the resulting values of DeleteContainer operation. 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. // The required time is also not predictable. @@ -185,7 +185,7 @@ func (x EACLRes) EACL() eacl.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. func EACL(prm EACLPrm) (res EACLRes, err error) { @@ -203,7 +203,7 @@ type SetEACLPrm struct { // SetEACLRes groups the resulting values of SetEACL operation. 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. // The required time is also not predictable. @@ -228,12 +228,12 @@ type NetworkInfoRes struct { 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 { 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. func NetworkInfo(prm NetworkInfoPrm) (res NetworkInfoRes, err error) { @@ -258,12 +258,12 @@ func (x NodeInfoRes) NodeInfo() netmap.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 { 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. func NodeInfo(prm NodeInfoPrm) (res NodeInfoRes, err error) { @@ -282,7 +282,7 @@ type NetMapSnapshotRes struct { 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 { return x.cliRes.NetMap() } @@ -362,7 +362,7 @@ func (x PutObjectRes) ID() oid.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. func PutObject(prm PutObjectPrm) (*PutObjectRes, error) { @@ -460,7 +460,7 @@ func (x DeleteObjectRes) Tombstone() oid.ID { 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. func DeleteObject(prm DeleteObjectPrm) (*DeleteObjectRes, error) { @@ -576,7 +576,7 @@ type HeadObjectPrm struct { 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) { x.mainOnly = v } @@ -812,7 +812,7 @@ func (x *PayloadRangePrm) SetRange(rng *object.Range) { // PayloadRangeRes groups the resulting values of PayloadRange operation. 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. // @@ -872,7 +872,7 @@ func (s *SyncContainerPrm) SetContainer(c *containerSDK.Container) { // operation. type SyncContainerRes struct{} -// SyncContainerSettings reads global network config from NeoFS and +// SyncContainerSettings reads global network config from FrostFS and // syncs container settings with it. // // Interrupts on any writer error. diff --git a/cmd/frostfs-cli/internal/client/doc.go b/cmd/frostfs-cli/internal/client/doc.go index 9a8429d7..7c6f48fc 100644 --- a/cmd/frostfs-cli/internal/client/doc.go +++ b/cmd/frostfs-cli/internal/client/doc.go @@ -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. -// However, although it encapsulates a useful piece of business logic (e.g. the signature mechanism), -// the NeoFS CLI application does not fully use the client's flexible interface. +// 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 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. -// 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 -// application packages will be limited to this package for the development of functionality requiring -// NeoFS API communication. +// In this regard, this package provides functions over base API client +// necessary for the application. 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 application packages will be limited to this package for +// the development of functionality requiring FrostFS API communication. package internal diff --git a/cmd/frostfs-cli/internal/client/prm.go b/cmd/frostfs-cli/internal/client/prm.go index 46a10044..c98c612a 100644 --- a/cmd/frostfs-cli/internal/client/prm.go +++ b/cmd/frostfs-cli/internal/client/prm.go @@ -16,7 +16,7 @@ type commonPrm struct { 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) { x.cli = cli } diff --git a/cmd/frostfs-cli/internal/common/token.go b/cmd/frostfs-cli/internal/common/token.go index 53d2b55a..abe16265 100644 --- a/cmd/frostfs-cli/internal/common/token.go +++ b/cmd/frostfs-cli/internal/common/token.go @@ -31,7 +31,7 @@ func ReadBearerToken(cmd *cobra.Command, flagname string) *bearer.Token { } // BinaryOrJSON is an interface of entities which provide json.Unmarshaler -// and NeoFS binary decoder. +// and FrostFS binary decoder. type BinaryOrJSON interface { Unmarshal([]byte) error json.Unmarshaler diff --git a/cmd/frostfs-cli/internal/commonflags/session.go b/cmd/frostfs-cli/internal/commonflags/session.go index 72a9d922..ee61944e 100644 --- a/cmd/frostfs-cli/internal/commonflags/session.go +++ b/cmd/frostfs-cli/internal/commonflags/session.go @@ -8,8 +8,8 @@ import ( const SessionToken = "session" -// InitSession registers SessionToken flag representing filepath to the token -// of the session with the given name. Supports NeoFS-binary and JSON files. +// InitSession registers SessionToken flag representing file path to the token of +// the session with the given name. Supports FrostFS-binary and JSON files. func InitSession(cmd *cobra.Command, name string) { cmd.Flags().String( SessionToken, diff --git a/cmd/frostfs-cli/modules/netmap/netinfo.go b/cmd/frostfs-cli/modules/netmap/netinfo.go index bd50d7d7..bd8e5e94 100644 --- a/cmd/frostfs-cli/modules/netmap/netinfo.go +++ b/cmd/frostfs-cli/modules/netmap/netinfo.go @@ -37,7 +37,7 @@ var netInfoCmd = &cobra.Command{ 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, "Storage price", netInfo.StoragePrice()) 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, "Maintenance mode allowed", netInfo.MaintenanceModeAllowed()) - cmd.Println("NeoFS network configuration (other)") + cmd.Println("FrostFS network configuration (other)") netInfo.IterateRawNetworkParameters(func(name string, value []byte) { cmd.Printf(format, name, hex.EncodeToString(value)) }) diff --git a/cmd/frostfs-cli/modules/object/lock.go b/cmd/frostfs-cli/modules/object/lock.go index bb5a8b17..65035994 100644 --- a/cmd/frostfs-cli/modules/object/lock.go +++ b/cmd/frostfs-cli/modules/object/lock.go @@ -86,7 +86,7 @@ var objectLockCmd = &cobra.Command{ prm.SetHeader(obj) 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.Println("Objects successfully locked.") diff --git a/cmd/frostfs-cli/modules/object/util.go b/cmd/frostfs-cli/modules/object/util.go index 7e7cb4ea..e225191d 100644 --- a/cmd/frostfs-cli/modules/object/util.go +++ b/cmd/frostfs-cli/modules/object/util.go @@ -274,7 +274,7 @@ func OpenSessionViaClient(cmd *cobra.Command, dst SessionPrm, cli *client.Client 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...") diff --git a/cmd/frostfs-cli/modules/session/create.go b/cmd/frostfs-cli/modules/session/create.go index 4b9ce515..61691b57 100644 --- a/cmd/frostfs-cli/modules/session/create.go +++ b/cmd/frostfs-cli/modules/session/create.go @@ -81,7 +81,7 @@ func createSession(cmd *cobra.Command, _ []string) { 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 // number of epochs. // diff --git a/cmd/frostfs-node/config.go b/cmd/frostfs-node/config.go index e090f8b3..bf3493de 100644 --- a/cmd/frostfs-node/config.go +++ b/cmd/frostfs-node/config.go @@ -849,8 +849,8 @@ func (c *cfg) LocalNodeInfo() (*netmapV2.NodeInfo, error) { return &res, nil } -// handleLocalNodeInfo rewrites local node info from the NeoFS network map. -// Called with nil when storage node is outside the NeoFS network map +// handleLocalNodeInfo rewrites local node info from the FrostFS network map. +// Called with nil when storage node is outside the FrostFS network map // (before entering the network and after leaving it). func (c *cfg) handleLocalNodeInfo(ni *netmap.NodeInfo) { c.cfgNetmap.state.setNodeInfo(ni) diff --git a/cmd/frostfs-node/control.go b/cmd/frostfs-node/control.go index 9b491e31..1ff73812 100644 --- a/cmd/frostfs-node/control.go +++ b/cmd/frostfs-node/control.go @@ -59,7 +59,7 @@ func initControlService(c *cfg) { c.cfgControlService.server = grpc.NewServer() 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) diff --git a/cmd/frostfs-node/grpc.go b/cmd/frostfs-node/grpc.go index b9c7c970..b441eb9e 100644 --- a/cmd/frostfs-node/grpc.go +++ b/cmd/frostfs-node/grpc.go @@ -65,7 +65,7 @@ func initGRPC(c *cfg) { srv := grpc.NewServer(serverOpts...) 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) diff --git a/cmd/frostfs-node/notificator.go b/cmd/frostfs-node/notificator.go index 10093f5b..8acc4b43 100644 --- a/cmd/frostfs-node/notificator.go +++ b/cmd/frostfs-node/notificator.go @@ -117,7 +117,7 @@ func initNotifications(c *cfg) { } 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.WithClientCert( nodeconfig.Notification(c.appCfg).CertPath(), diff --git a/cmd/frostfs-node/reputation/internal/client/client.go b/cmd/frostfs-node/reputation/internal/client/client.go index ef5627dd..b9cc37c8 100644 --- a/cmd/frostfs-node/reputation/internal/client/client.go +++ b/cmd/frostfs-node/reputation/internal/client/client.go @@ -15,7 +15,7 @@ type commonPrm struct { ctx context.Context } -// SetClient sets the base client for NeoFS API communication. +// SetClient sets the base client for FrostFS API communication. // // Required parameter. func (x *commonPrm) SetClient(cli coreclient.Client) { diff --git a/cmd/frostfs-node/reputation/internal/client/doc.go b/cmd/frostfs-node/reputation/internal/client/doc.go index f7823563..1dc66cee 100644 --- a/cmd/frostfs-node/reputation/internal/client/doc.go +++ b/cmd/frostfs-node/reputation/internal/client/doc.go @@ -1,5 +1,5 @@ -// Package internal provides functionality for NeoFS Node Reputation system 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 Reputation system 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 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 // 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 -// NeoFS API communication. +// FrostFS API communication. package internal