Documentation ¶
Index ¶
- Variables
- func CalculateHash(sg Provider) (hash.Hash, error)
- func CalculateSize(sg Provider) (size uint64)
- type Hash
- type IDList
- type IdentificationInfo
- type InfoReceiver
- type Lister
- type Provider
- type Receiver
- type Receptacle
- type StorageGroup
- func (*StorageGroup) Descriptor() ([]byte, []int)
- func (m StorageGroup) Empty() bool
- func (m *StorageGroup) GetLifetime() *StorageGroup_Lifetime
- func (m *StorageGroup) GetValidationDataSize() uint64
- func (m *StorageGroup) Marshal() (dAtA []byte, err error)
- func (m *StorageGroup) MarshalTo(dAtA []byte) (int, error)
- func (m *StorageGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StorageGroup) ProtoMessage()
- func (m *StorageGroup) Reset()
- func (m *StorageGroup) Size() (n int)
- func (m *StorageGroup) String() string
- func (m *StorageGroup) Unmarshal(dAtA []byte) error
- func (m *StorageGroup) XXX_DiscardUnknown()
- func (m *StorageGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StorageGroup) XXX_Merge(src proto.Message)
- func (m *StorageGroup) XXX_Size() int
- func (m *StorageGroup) XXX_Unmarshal(b []byte) error
- type StorageGroup_Lifetime
- func (*StorageGroup_Lifetime) Descriptor() ([]byte, []int)
- func (m *StorageGroup_Lifetime) GetUnit() StorageGroup_Lifetime_Unit
- func (m *StorageGroup_Lifetime) GetValue() int64
- func (m *StorageGroup_Lifetime) Marshal() (dAtA []byte, err error)
- func (m *StorageGroup_Lifetime) MarshalTo(dAtA []byte) (int, error)
- func (m *StorageGroup_Lifetime) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StorageGroup_Lifetime) ProtoMessage()
- func (m *StorageGroup_Lifetime) Reset()
- func (m *StorageGroup_Lifetime) Size() (n int)
- func (m *StorageGroup_Lifetime) String() string
- func (m *StorageGroup_Lifetime) Unmarshal(dAtA []byte) error
- func (m *StorageGroup_Lifetime) XXX_DiscardUnknown()
- func (m *StorageGroup_Lifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StorageGroup_Lifetime) XXX_Merge(src proto.Message)
- func (m *StorageGroup_Lifetime) XXX_Size() int
- func (m *StorageGroup_Lifetime) XXX_Unmarshal(b []byte) error
- type StorageGroup_Lifetime_Unit
- type Store
- type ZoneInfo
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var StorageGroup_Lifetime_Unit_name = map[int32]string{
0: "Unlimited",
1: "NeoFSEpoch",
2: "UnixTime",
}
var StorageGroup_Lifetime_Unit_value = map[string]int32{
"Unlimited": 0,
"NeoFSEpoch": 1,
"UnixTime": 2,
}
Functions ¶
func CalculateHash ¶
CalculateHash returns homomorphic sum of hashes fromm all zones in storage group.
func CalculateSize ¶
CalculateSize combines length of all zones in storage group.
Types ¶
type IDList ¶
IDList is a slice of object ids, that can be sorted.
type IdentificationInfo ¶
IdentificationInfo provides meta information about storage group.
type InfoReceiver ¶
type InfoReceiver interface {
GetSGInfo(ctx context.Context, cid refs.CID, group []refs.ObjectID) (*StorageGroup, error)
}
InfoReceiver defines GetSGInfo function that returns storage group that contains passed object ids.
type Lister ¶
Lister defines list function that returns all storage groups created for the passed container
type Provider ¶
type Provider interface { // Group returns list of object ids of the storage group. // This list **should be** sorted. Group() []refs.ObjectID IDInfo() *IdentificationInfo Zones() []ZoneInfo }
Provider is an interface that defines storage group instance. There was different storage group implementation. Right now it is implemented as extended header in the object.
type Receiver ¶
type Receiver interface {
Get(ctx context.Context, cid refs.CID, sgid refs.SGID) (Provider, error)
}
Receiver defines get function that returns asked storage group
type Receptacle ¶
Receptacle defines put function that places storage group in the store.
type StorageGroup ¶
type StorageGroup struct { // ValidationDataSize is size of the all object's payloads included into storage group ValidationDataSize uint64 `protobuf:"varint,1,opt,name=ValidationDataSize,proto3" json:"ValidationDataSize,omitempty"` // ValidationHash is homomorphic hash of all object's payloads included into storage group ValidationHash Hash `protobuf:"bytes,2,opt,name=ValidationHash,proto3,customtype=Hash" json:"ValidationHash"` // Lifetime is time until storage group is valid Lifetime *StorageGroup_Lifetime `protobuf:"bytes,3,opt,name=lifetime,proto3" json:"lifetime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StorageGroup) Descriptor ¶
func (*StorageGroup) Descriptor() ([]byte, []int)
func (StorageGroup) Empty ¶
func (m StorageGroup) Empty() bool
Empty checks if storage group has some data for validation.
func (*StorageGroup) GetLifetime ¶
func (m *StorageGroup) GetLifetime() *StorageGroup_Lifetime
func (*StorageGroup) GetValidationDataSize ¶
func (m *StorageGroup) GetValidationDataSize() uint64
func (*StorageGroup) Marshal ¶
func (m *StorageGroup) Marshal() (dAtA []byte, err error)
func (*StorageGroup) MarshalToSizedBuffer ¶
func (m *StorageGroup) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StorageGroup) ProtoMessage ¶
func (*StorageGroup) ProtoMessage()
func (*StorageGroup) Reset ¶
func (m *StorageGroup) Reset()
func (*StorageGroup) Size ¶
func (m *StorageGroup) Size() (n int)
func (*StorageGroup) String ¶
func (m *StorageGroup) String() string
String returns string representation of StorageGroup.
func (*StorageGroup) Unmarshal ¶
func (m *StorageGroup) Unmarshal(dAtA []byte) error
func (*StorageGroup) XXX_DiscardUnknown ¶
func (m *StorageGroup) XXX_DiscardUnknown()
func (*StorageGroup) XXX_Marshal ¶
func (m *StorageGroup) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StorageGroup) XXX_Merge ¶
func (m *StorageGroup) XXX_Merge(src proto.Message)
func (*StorageGroup) XXX_Size ¶
func (m *StorageGroup) XXX_Size() int
func (*StorageGroup) XXX_Unmarshal ¶
func (m *StorageGroup) XXX_Unmarshal(b []byte) error
type StorageGroup_Lifetime ¶
type StorageGroup_Lifetime struct { // Unit is lifetime type Unit StorageGroup_Lifetime_Unit `protobuf:"varint,1,opt,name=unit,proto3,enum=storagegroup.StorageGroup_Lifetime_Unit" json:"unit,omitempty"` // Value for lifetime Value int64 `protobuf:"varint,2,opt,name=Value,proto3" json:"Value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*StorageGroup_Lifetime) Descriptor ¶
func (*StorageGroup_Lifetime) Descriptor() ([]byte, []int)
func (*StorageGroup_Lifetime) GetUnit ¶
func (m *StorageGroup_Lifetime) GetUnit() StorageGroup_Lifetime_Unit
func (*StorageGroup_Lifetime) GetValue ¶
func (m *StorageGroup_Lifetime) GetValue() int64
func (*StorageGroup_Lifetime) Marshal ¶
func (m *StorageGroup_Lifetime) Marshal() (dAtA []byte, err error)
func (*StorageGroup_Lifetime) MarshalTo ¶
func (m *StorageGroup_Lifetime) MarshalTo(dAtA []byte) (int, error)
func (*StorageGroup_Lifetime) MarshalToSizedBuffer ¶
func (m *StorageGroup_Lifetime) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StorageGroup_Lifetime) ProtoMessage ¶
func (*StorageGroup_Lifetime) ProtoMessage()
func (*StorageGroup_Lifetime) Reset ¶
func (m *StorageGroup_Lifetime) Reset()
func (*StorageGroup_Lifetime) Size ¶
func (m *StorageGroup_Lifetime) Size() (n int)
func (*StorageGroup_Lifetime) String ¶
func (m *StorageGroup_Lifetime) String() string
func (*StorageGroup_Lifetime) Unmarshal ¶
func (m *StorageGroup_Lifetime) Unmarshal(dAtA []byte) error
func (*StorageGroup_Lifetime) XXX_DiscardUnknown ¶
func (m *StorageGroup_Lifetime) XXX_DiscardUnknown()
func (*StorageGroup_Lifetime) XXX_Marshal ¶
func (m *StorageGroup_Lifetime) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StorageGroup_Lifetime) XXX_Merge ¶
func (m *StorageGroup_Lifetime) XXX_Merge(src proto.Message)
func (*StorageGroup_Lifetime) XXX_Size ¶
func (m *StorageGroup_Lifetime) XXX_Size() int
func (*StorageGroup_Lifetime) XXX_Unmarshal ¶
func (m *StorageGroup_Lifetime) XXX_Unmarshal(b []byte) error
type StorageGroup_Lifetime_Unit ¶
type StorageGroup_Lifetime_Unit int32
const ( // Unlimited set if storage group always valid StorageGroup_Lifetime_Unlimited StorageGroup_Lifetime_Unit = 0 // NeoFSEpoch set if storage group is valid until lifetime NeoFS epoch StorageGroup_Lifetime_NeoFSEpoch StorageGroup_Lifetime_Unit = 1 // UnixTime set if storage group is valid until lifetime unix timestamp StorageGroup_Lifetime_UnixTime StorageGroup_Lifetime_Unit = 2 )
func (StorageGroup_Lifetime_Unit) EnumDescriptor ¶
func (StorageGroup_Lifetime_Unit) EnumDescriptor() ([]byte, []int)
func (StorageGroup_Lifetime_Unit) String ¶
func (x StorageGroup_Lifetime_Unit) String() string
type Store ¶
type Store interface { Lister Receiver Receptacle }
Store is a interface for storing users storage group