Documentation ¶
Index ¶
- type Info
- func (x *Info) FromGRPCMessage(m grpc.Message) error
- func (x *Info) ID() *refs.SubnetID
- func (x *Info) Owner() *refs.OwnerID
- func (x *Info) SetID(id *refs.SubnetID)
- func (x *Info) SetOwner(id *refs.OwnerID)
- func (x *Info) StableMarshal(buf []byte) ([]byte, error)
- func (x *Info) StableSize() (size int)
- func (x *Info) ToGRPCMessage() grpc.Message
- func (x *Info) Unmarshal(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct {
// contains filtered or unexported fields
}
Info represents information about NeoFS subnet. Structure is compatible with NeoFS API V2 protocol.
Zero value represents zero subnet w/o an owner.
func (*Info) FromGRPCMessage ¶
FromGRPCMessage restores Info from grpc.Message.
Supported types:
- subnet.SubnetInfo.
func (*Info) SetID ¶
SetID returns identifier of the subnet. Nil arg is equivalent to zero subnet ID.
func (*Info) StableMarshal ¶
StableMarshal marshals Info to NeoFS API V2 binary format (Protocol Buffers with direct field order).
Returns a slice of recorded data. Data is written to the provided buffer if there is enough space.
func (*Info) StableSize ¶
StableSize returns the number of bytes required to write Info in NeoFS API V2 binary format (see StableMarshal).
func (*Info) ToGRPCMessage ¶
ToGRPCMessage forms subnet.SubnetInfo message and returns it as grpc.Message.