Documentation
¶
Index ¶
- func AuditObjectDetail(ctx context.Context, log *logger.Logger, obj *objectSDK.Object, ...)
- func NeedAdditionalBroadcast(obj *objectSDK.Object, localOnly bool) bool
- func NeedHighPriorityReplication(ctx context.Context, obj *objectSDK.Object) bool
- func New(prm *Params) transformer.ObjectWriter
- type ClientConstructor
- type Config
- type ECWriter
- type FormatValidatorConfig
- type InnerRing
- type LocalTarget
- type MaxSizeSource
- type NodeDescriptor
- type NodeIterator
- type ObjectStorage
- type Option
- type Params
- type RemotePutPrm
- type RemoteSender
- type Traversal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuditObjectDetail ¶ added in v0.47.9
func NeedAdditionalBroadcast ¶
func NeedHighPriorityReplication ¶ added in v0.48.0
func New ¶
func New(prm *Params) transformer.ObjectWriter
Types ¶
type ClientConstructor ¶
type ClientConstructor interface {
Get(client.NodeInfo) (client.MultiAddressClient, error)
}
type Config ¶
type Config struct {
KeyStorage *objectSvc.KeyStorage
MaxSizeSrc MaxSizeSource
LocalStore ObjectStorage
ContainerSource container.Source
NetmapSource netmap.Source
NetmapKeys netmap.AnnouncedKeys
FormatValidator *object.FormatValidator
NetworkState netmap.State
ClientConstructor ClientConstructor
Logger *logger.Logger
VerifySessionTokenIssuer bool
ConfigSource netmap.ConfigSource
DisableBroadcast bool
}
Config represents a set of static parameters that are established during the initialization phase of all services.
func (*Config) NewNodeIterator ¶
func (c *Config) NewNodeIterator(opts []placement.Option) *NodeIterator
type ECWriter ¶
type ECWriter struct {
Config *Config
PlacementOpts []placement.Option
Container containerSDK.Container
Key *ecdsa.PrivateKey
CommonPrm *objectSvc.CommonPrm
Relay func(context.Context, client.NodeInfo, client.MultiAddressClient) error
ObjectMeta object.ContentMeta
ObjectMetaValid bool
// contains filtered or unexported fields
}
type FormatValidatorConfig ¶
type FormatValidatorConfig interface {
VerifySessionTokenIssuer() bool
}
type LocalTarget ¶
type LocalTarget struct {
Storage ObjectStorage
Container containerSDK.Container
AfterObjectWriteCallback func(*objectSDK.Object)
}
func (LocalTarget) WriteObject ¶
func (t LocalTarget) WriteObject(ctx context.Context, obj *objectSDK.Object, meta objectCore.ContentMeta) error
type MaxSizeSource ¶
type NodeDescriptor ¶
type NodeIterator ¶
type NodeIterator struct {
Traversal
// contains filtered or unexported fields
}
func (*NodeIterator) ForEachNode ¶
func (n *NodeIterator) ForEachNode(ctx context.Context, f func(context.Context, NodeDescriptor) error) error
type ObjectStorage ¶
type ObjectStorage interface {
// Put must save passed object
// and return any appeared error.
Put(context.Context, *objectSDK.Object, bool) error
// Delete must delete passed objects
// and return any appeared error.
Delete(ctx context.Context, tombstone oid.Address, toDelete []oid.ID, expEpoch uint64) error
// Lock must lock passed objects
// and return any appeared error.
Lock(ctx context.Context, locker oid.Address, toLock []oid.ID, expEpoch uint64) 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(*Config)
func WithHighPriorityReplicationInsteadOfBroadcast ¶ added in v0.48.0
WithHighPriorityReplicationInsteadOfBroadcast specifies whether the service should replicate certain objects — tombstones, locks, and linking objects — to all container nodes using asynchronous high-priority replication instead of synchronous broadcast.
func WithLogger ¶
type Params ¶
type Params struct {
Config *Config
Common *objectSvc.CommonPrm
Header *objectSDK.Object
Container containerSDK.Container
TraverseOpts []placement.Option
Relay func(context.Context, client.NodeInfo, client.MultiAddressClient) error
SignRequestPrivateKey *ecdsa.PrivateKey
AfterLocalObjectWriteCallback func(*objectSDK.Object)
}
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 *objectSvc.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 Traversal ¶
type Traversal struct {
Opts []placement.Option
// need of additional broadcast after the object is saved
ExtraBroadcastEnabled bool
// container nodes which was processed during the primary object placement
Exclude map[string]*bool
ResetSuccessAfterOnBroadcast bool
}
Traversal parameters and state of container.