storagegroup

package
v1.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageGroup

type StorageGroup storagegroup.StorageGroup

StorageGroup represents v2-compatible storage group.

func New

func New() *StorageGroup

New creates and initializes blank StorageGroup.

Defaults:

  • size: 0;
  • exp: 0;
  • members: nil;
  • hash: nil.

func NewFromV2

func NewFromV2(aV2 *storagegroup.StorageGroup) *StorageGroup

NewFromV2 wraps v2 StorageGroup message to StorageGroup.

Nil storagegroup.StorageGroup converts to nil.

func (*StorageGroup) ExpirationEpoch

func (sg *StorageGroup) ExpirationEpoch() uint64

ExpirationEpoch returns last NeoFS epoch number of the storage group lifetime.

func (*StorageGroup) Marshal

func (sg *StorageGroup) Marshal(b ...[]byte) ([]byte, error)

Marshal marshals StorageGroup into a protobuf binary form.

Buffer is allocated when the argument is empty. Otherwise, the first buffer is used.

func (*StorageGroup) MarshalJSON

func (sg *StorageGroup) MarshalJSON() ([]byte, error)

MarshalJSON encodes StorageGroup to protobuf JSON format.

func (*StorageGroup) Members

func (sg *StorageGroup) Members() []*object.ID

Members returns strictly ordered list of storage group member objects.

func (*StorageGroup) SetExpirationEpoch

func (sg *StorageGroup) SetExpirationEpoch(epoch uint64)

SetExpirationEpoch sets last NeoFS epoch number of the storage group lifetime.

func (*StorageGroup) SetMembers

func (sg *StorageGroup) SetMembers(members []*object.ID)

SetMembers sets strictly ordered list of storage group member objects.

func (*StorageGroup) SetValidationDataHash

func (sg *StorageGroup) SetValidationDataHash(hash *pkg.Checksum)

SetValidationDataHash sets homomorphic hash from the concatenation of the payloads of the storage group members.

func (*StorageGroup) SetValidationDataSize

func (sg *StorageGroup) SetValidationDataSize(epoch uint64)

SetValidationDataSize sets total size of the payloads of objects in the storage group.

func (*StorageGroup) ToV2

ToV2 converts StorageGroup to v2 StorageGroup message.

Nil StorageGroup converts to nil.

func (*StorageGroup) Unmarshal

func (sg *StorageGroup) Unmarshal(data []byte) error

Unmarshal unmarshals protobuf binary representation of StorageGroup.

func (*StorageGroup) UnmarshalJSON

func (sg *StorageGroup) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes StorageGroup from protobuf JSON format.

func (*StorageGroup) ValidationDataHash

func (sg *StorageGroup) ValidationDataHash() *pkg.Checksum

ValidationDataHash returns homomorphic hash from the concatenation of the payloads of the storage group members.

func (*StorageGroup) ValidationDataSize

func (sg *StorageGroup) ValidationDataSize() uint64

ValidationDataSize returns total size of the payloads of objects in the storage group

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL