Documentation ¶
Index ¶
- Variables
- type ClientConstructor
- type FormatValidatorConfig
- type InnerRing
- type MaxSizeSource
- type ObjectStorage
- type Option
- type PutChunkPrm
- type PutInitPrm
- func (p *PutInitPrm) WithCommonPrm(v *util.CommonPrm) *PutInitPrm
- func (p *PutInitPrm) WithCopyNumbers(v []uint32) *PutInitPrm
- func (p *PutInitPrm) WithObject(v *objectSDK.Object) *PutInitPrm
- func (p *PutInitPrm) WithRelay(f func(context.Context, client.NodeInfo, client.MultiAddressClient) error) *PutInitPrm
- type PutResponse
- type RemotePutPrm
- type RemoteSender
- type Service
- type Streamer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrExceedingMaxSize is returned when payload size is greater than the limit. ErrExceedingMaxSize = errors.New("payload size is greater than the limit") // ErrWrongPayloadSize is returned when chunk payload size is greater than the length declared in header. ErrWrongPayloadSize = errors.New("wrong payload size") )
Functions ¶
This section is empty.
Types ¶
type ClientConstructor ¶
type ClientConstructor interface {
Get(client.NodeInfo) (client.MultiAddressClient, error)
}
type FormatValidatorConfig ¶ added in v0.37.0
type FormatValidatorConfig interface {
VerifySessionTokenIssuer() bool
}
type MaxSizeSource ¶
type MaxSizeSource interface { // MaxObjectSize returns maximum payload size // of physically stored object in system. // // Must return 0 if value can not be obtained. MaxObjectSize() uint64 }
type ObjectStorage ¶
type ObjectStorage interface { // Put must save passed object // and return any appeared error. Put(context.Context, *objectSDK.Object) error // Delete must delete passed objects // and return any appeared error. Delete(ctx context.Context, tombstone oid.Address, toDelete []oid.ID) error // Lock must lock passed objects // and return any appeared error. Lock(ctx context.Context, locker oid.Address, toLock []oid.ID) error // IsLocked must clarify object's lock status. IsLocked(context.Context, oid.Address) (bool, error) }
ObjectStorage is an object storage interface.
type Option ¶
type Option func(*cfg)
func WithLogger ¶
func WithVerifySessionTokenIssuer ¶ added in v0.37.0
func WithWorkerPools ¶
func WithWorkerPools(remote, local util.WorkerPool) Option
type PutChunkPrm ¶
type PutChunkPrm struct {
// contains filtered or unexported fields
}
func (*PutChunkPrm) WithChunk ¶
func (p *PutChunkPrm) WithChunk(v []byte) *PutChunkPrm
type PutInitPrm ¶
type PutInitPrm struct {
// contains filtered or unexported fields
}
func (*PutInitPrm) WithCommonPrm ¶
func (p *PutInitPrm) WithCommonPrm(v *util.CommonPrm) *PutInitPrm
func (*PutInitPrm) WithCopyNumbers ¶ added in v0.37.0
func (p *PutInitPrm) WithCopyNumbers(v []uint32) *PutInitPrm
func (*PutInitPrm) WithObject ¶
func (p *PutInitPrm) WithObject(v *objectSDK.Object) *PutInitPrm
func (*PutInitPrm) WithRelay ¶
func (p *PutInitPrm) WithRelay(f func(context.Context, client.NodeInfo, client.MultiAddressClient) error) *PutInitPrm
type PutResponse ¶
type PutResponse struct {
// contains filtered or unexported fields
}
func (*PutResponse) ObjectID ¶
func (r *PutResponse) ObjectID() oid.ID
type RemotePutPrm ¶
type RemotePutPrm struct {
// contains filtered or unexported fields
}
RemotePutPrm groups remote put operation parameters.
func (*RemotePutPrm) WithNodeInfo ¶
func (p *RemotePutPrm) WithNodeInfo(v netmap.NodeInfo) *RemotePutPrm
WithNodeInfo sets information about the remote node.
func (*RemotePutPrm) WithObject ¶
func (p *RemotePutPrm) WithObject(v *objectSDK.Object) *RemotePutPrm
WithObject sets transferred object.
type RemoteSender ¶
type RemoteSender struct {
// contains filtered or unexported fields
}
RemoteSender represents utility for sending an object to a remote host.
func NewRemoteSender ¶
func NewRemoteSender(keyStorage *util.KeyStorage, cons ClientConstructor) *RemoteSender
NewRemoteSender creates, initializes and returns new RemoteSender instance.
func (*RemoteSender) PutObject ¶
func (s *RemoteSender) PutObject(ctx context.Context, p *RemotePutPrm) error
PutObject sends object to remote node.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(ks *objutil.KeyStorage, cc ClientConstructor, ms MaxSizeSource, os ObjectStorage, cs container.Source, ns netmap.Source, nk netmap.AnnouncedKeys, nst netmap.State, ir InnerRing, opts ...Option) *Service
func (*Service) PutSingle ¶ added in v0.37.0
func (s *Service) PutSingle(ctx context.Context, req *objectAPI.PutSingleRequest) (*objectAPI.PutSingleResponse, error)
type Streamer ¶
type Streamer struct {
// contains filtered or unexported fields
}
func (*Streamer) MaxObjectSize ¶
MaxObjectSize returns maximum payload size for the streaming session.
Must be called after the successful Init.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.