Documentation
¶
Index ¶
Constants ¶
const ( // ErrInvalidSGLinking is returned by Transformer that received // an object with broken storage group links. ErrInvalidSGLinking = internal.Error("invalid storage group linking") // PrivateSessionToken is a context key for session.PrivateToken. PrivateSessionToken = "private token" // PublicSessionToken is a context key for service.SessionToken. PublicSessionToken = "public token" )
const ErrPayloadEOF = internal.Error("payload EOF")
ErrPayloadEOF is returned by Transformer that received unexpected end of object payload.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EpochReceiver ¶
type EpochReceiver interface {
Epoch() uint64
}
EpochReceiver is an interface of epoch number container with read access.
type ObjectRestorer ¶
type ObjectRestorer interface {
Type() object.Transform_Type
Restore(context.Context, ...Object) ([]Object, error)
}
ObjectRestorer is an interface of object restorer.
func NewRestorePipeline ¶
func NewRestorePipeline(t ...ObjectRestorer) ObjectRestorer
NewRestorePipeline is a constructor of the pipeline of object restorers.
func SplitRestorer ¶
func SplitRestorer() ObjectRestorer
SplitRestorer is a splitted object restorer's constructor.
type Params ¶
type Params struct {
SGInfoReceiver storagegroup.InfoReceiver
EpochReceiver EpochReceiver
SizeLimit uint64
Verifier objutil.Verifier
}
Params groups the parameters of object transformer's constructor.
type ProcUnit ¶
ProcUnit groups the information about transforming unit.
func EmptyPayloadUnit ¶
EmptyPayloadUnit returns ProcUnit with Object from argument and empty payload reader that always returns (0, io.EOF).
type ProcUnitHandler ¶
ProcUnitHandler is a handling ProcUnit function.
type StorageGroup ¶
type StorageGroup = storagegroup.StorageGroup
StorageGroup is a type alias of StorageGroup from storagegroup package of neofs-api-go.
type Transformer ¶
type Transformer interface {
Transform(context.Context, ProcUnit, ...ProcUnitHandler) error
}
Transformer is an interface of object transformer.
func NewTransformer ¶
func NewTransformer(p Params) (Transformer, error)
NewTransformer is an object transformer's constructor.
type Type ¶
type Type = object.Transform_Type
Type is a type alias of Type from object package of neofs-api-go.