forked from TrueCloudLab/frostfs-api-go
348f9498bd
NeoFS storage node can participate in a subnet group (at least one). According to NeoFS API V2 protocol, subnets are entered and exited through the attributes of the node. We should provide functionality for conveniently setting and reading attributes based on the needs of the network. Define `NodeSubnetInfo` type which groups information about the subnet reflected in `NodeInfo`. Implement `WriteSubnetInfo` function which writes `SubnetInfo` data to `NodeInfo`. It will be used to prepare a request for registration on the NeoFS network. Implement `IterateSubnets` function which allows to iterate over all subnets of the node. Moreover, it allows you to remove a subnet from the `NodeInfo` right during iterative traversal. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru> |
||
---|---|---|
.. | ||
grpc | ||
test | ||
attributes.go | ||
attributes_test.go | ||
convert.go | ||
json.go | ||
marshal.go | ||
message_test.go | ||
string.go | ||
types.go |