container

package
v0.42.11 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsECContainer added in v0.39.0

func IsECContainer(cnr containerSDK.Container) bool

IsECContainer returns True if container has erasure coding policy.

func WasRemoved added in v0.37.0

func WasRemoved(s Source, cid cid.ID) (bool, error)

WasRemoved checks whether the container ever existed or it just has not been created yet at the current epoch.

Types

type Container

type Container struct {
	// Container structure.
	Value container.Container

	// Signature of the Value.
	Signature frostfscrypto.Signature

	// Session within which Value was created. Nil means session absence.
	Session *session.Container
}

Container groups information about the FrostFS container stored in the FrostFS network.

type DelInfo added in v0.37.0

type DelInfo struct {
	// Container owner.
	Owner user.ID

	// Epoch indicates when the container was removed.
	Epoch uint64
}

DelInfo contains info about removed container.

type EACL

type EACL struct {
	// Extended ACL structure.
	Value *eacl.Table

	// Signature of the Value.
	Signature frostfscrypto.Signature

	// Session within which Value was set. Nil means session absence.
	Session *session.Container
}

EACL groups information about the FrostFS container's extended ACL stored in the FrostFS network.

type EACLSource

type EACLSource interface {
	// GetEACL reads the table from the source by identifier.
	// It returns any error encountered.
	//
	// GetEACL must return exactly one non-nil value.
	//
	// Must return apistatus.ErrEACLNotFound if requested
	// eACL table is not in source.
	GetEACL(cid.ID) (*EACL, error)
}

EACLSource is the interface that wraps basic methods of extended ACL table source.

type RemovalWitness

type RemovalWitness struct {
	// ContainerID returns the identifier of the container
	// to be removed.
	ContainerID cid.ID

	// Signature the signature of the container identifier.
	Signature *refs.Signature

	// SessionToken the token of the session within
	// which the container was removed.
	SessionToken *session.Container
}

RemovalWitness groups the information required to prove and verify the removal of a container.

type Source

type Source interface {
	// Get reads the container from the storage by its identifier.
	// It returns the pointer to the requested container and any error encountered.
	//
	// Get must return exactly one non-nil value.
	// Get must return an error of type apistatus.ContainerNotFound if the container is not in the storage.
	//
	// Implementations must not retain the container pointer and modify
	// the container through it.
	Get(cid.ID) (*Container, error)

	DeletionInfo(cid.ID) (*DelInfo, error)
}

Source is an interface that wraps basic container receiving method.

Jump to

Keyboard shortcuts

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