[#415] *: Go fmt -s
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
fcf1d02afc
commit
1853349f22
9 changed files with 23 additions and 16 deletions
|
@ -24,8 +24,8 @@ const disabledHomomorphicHashingValue = "true"
|
||||||
|
|
||||||
// HomomorphicHashingState returns container's homomorphic
|
// HomomorphicHashingState returns container's homomorphic
|
||||||
// hashing state:
|
// hashing state:
|
||||||
// * true if hashing is enabled;
|
// - true if hashing is enabled;
|
||||||
// * false if hashing is disabled.
|
// - false if hashing is disabled.
|
||||||
//
|
//
|
||||||
// All container's attributes must be unique, otherwise behavior
|
// All container's attributes must be unique, otherwise behavior
|
||||||
// is undefined.
|
// is undefined.
|
||||||
|
|
|
@ -6,8 +6,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// LocalizeFailStatus checks if passed global status.Code is related to container failure and:
|
// LocalizeFailStatus checks if passed global status.Code is related to container failure and:
|
||||||
// then localizes the code and returns true,
|
//
|
||||||
// else leaves the code unchanged and returns false.
|
// then localizes the code and returns true,
|
||||||
|
// else leaves the code unchanged and returns false.
|
||||||
//
|
//
|
||||||
// Arg must not be nil.
|
// Arg must not be nil.
|
||||||
func LocalizeFailStatus(c *status.Code) bool {
|
func LocalizeFailStatus(c *status.Code) bool {
|
||||||
|
|
|
@ -59,13 +59,13 @@ func subnetAttributeKey(id *refs.SubnetID) string {
|
||||||
// Existing subnet attributes are expected to be key-unique, otherwise undefined behavior.
|
// Existing subnet attributes are expected to be key-unique, otherwise undefined behavior.
|
||||||
//
|
//
|
||||||
// Does not add (removes existing) attribute if node:
|
// Does not add (removes existing) attribute if node:
|
||||||
// * disables non-zero subnet;
|
// - disables non-zero subnet;
|
||||||
// * enables zero subnet.
|
// - enables zero subnet.
|
||||||
//
|
//
|
||||||
// Attribute key is calculated from ID using format `__NEOFS__SUBNET_%s`.
|
// Attribute key is calculated from ID using format `__NEOFS__SUBNET_%s`.
|
||||||
// Attribute Value is:
|
// Attribute Value is:
|
||||||
// * `True` if node enters the subnet;
|
// - `True` if node enters the subnet;
|
||||||
// * `False`, otherwise.
|
// - `False`, otherwise.
|
||||||
func WriteSubnetInfo(node *NodeInfo, info NodeSubnetInfo) {
|
func WriteSubnetInfo(node *NodeInfo, info NodeSubnetInfo) {
|
||||||
attrs := node.GetAttributes()
|
attrs := node.GetAttributes()
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// LocalizeFailStatus checks if passed global status.Code is related to object failure and:
|
// LocalizeFailStatus checks if passed global status.Code is related to object failure and:
|
||||||
// then localizes the code and returns true,
|
//
|
||||||
// else leaves the code unchanged and returns false.
|
// then localizes the code and returns true,
|
||||||
|
// else leaves the code unchanged and returns false.
|
||||||
//
|
//
|
||||||
// Arg must not be nil.
|
// Arg must not be nil.
|
||||||
func LocalizeFailStatus(c *status.Code) bool {
|
func LocalizeFailStatus(c *status.Code) bool {
|
||||||
|
|
|
@ -283,7 +283,7 @@ func (s *SubnetID) ToGRPCMessage() grpc.Message {
|
||||||
// FromGRPCMessage restores Info from grpc.Message.
|
// FromGRPCMessage restores Info from grpc.Message.
|
||||||
//
|
//
|
||||||
// Supported types:
|
// Supported types:
|
||||||
// * refs.SubnetID.
|
// - refs.SubnetID.
|
||||||
func (s *SubnetID) FromGRPCMessage(m grpc.Message) error {
|
func (s *SubnetID) FromGRPCMessage(m grpc.Message) error {
|
||||||
v, ok := m.(*refs.SubnetID)
|
v, ok := m.(*refs.SubnetID)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
|
@ -6,8 +6,9 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// LocalizeFailStatus checks if passed global status.Code is related to session failure and:
|
// LocalizeFailStatus checks if passed global status.Code is related to session failure and:
|
||||||
// then localizes the code and returns true,
|
//
|
||||||
// else leaves the code unchanged and returns false.
|
// then localizes the code and returns true,
|
||||||
|
// else leaves the code unchanged and returns false.
|
||||||
//
|
//
|
||||||
// Arg must not be nil.
|
// Arg must not be nil.
|
||||||
func LocalizeFailStatus(c *status.Code) bool {
|
func LocalizeFailStatus(c *status.Code) bool {
|
||||||
|
|
|
@ -51,6 +51,7 @@ type TokenContext interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: use TokenContext instead.
|
// Deprecated: use TokenContext instead.
|
||||||
|
//
|
||||||
//nolint:revive
|
//nolint:revive
|
||||||
type SessionTokenContext = TokenContext
|
type SessionTokenContext = TokenContext
|
||||||
|
|
||||||
|
@ -67,6 +68,7 @@ type TokenBody struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: use TokenBody instead.
|
// Deprecated: use TokenBody instead.
|
||||||
|
//
|
||||||
//nolint:revive
|
//nolint:revive
|
||||||
type SessionTokenBody = TokenBody
|
type SessionTokenBody = TokenBody
|
||||||
|
|
||||||
|
@ -77,6 +79,7 @@ type Token struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated: use Token instead.
|
// Deprecated: use Token instead.
|
||||||
|
//
|
||||||
//nolint:revive
|
//nolint:revive
|
||||||
type SessionToken = Token
|
type SessionToken = Token
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,9 @@ func GlobalizeCommonFail(c *Code) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// LocalizeIfInSection checks if passed global status.Code belongs to the section and:
|
// LocalizeIfInSection checks if passed global status.Code belongs to the section and:
|
||||||
// then localizes the code and returns true,
|
//
|
||||||
// else leaves the code unchanged and returns false.
|
// then localizes the code and returns true,
|
||||||
|
// else leaves the code unchanged and returns false.
|
||||||
//
|
//
|
||||||
// Arg must not be nil.
|
// Arg must not be nil.
|
||||||
func LocalizeIfInSection(c *Code, sec uint32) bool {
|
func LocalizeIfInSection(c *Code, sec uint32) bool {
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (x *Info) ToGRPCMessage() grpc.Message {
|
||||||
// FromGRPCMessage restores Info from grpc.Message.
|
// FromGRPCMessage restores Info from grpc.Message.
|
||||||
//
|
//
|
||||||
// Supported types:
|
// Supported types:
|
||||||
// * subnet.SubnetInfo.
|
// - subnet.SubnetInfo.
|
||||||
func (x *Info) FromGRPCMessage(m grpc.Message) error {
|
func (x *Info) FromGRPCMessage(m grpc.Message) error {
|
||||||
v, ok := m.(*subnet.SubnetInfo)
|
v, ok := m.(*subnet.SubnetInfo)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|
Loading…
Reference in a new issue