Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*cfg)
Option is an option for Policer constructor.
func WithLocalStorage ¶
func WithLocalStorage(v *engine.StorageEngine) Option
WithLocalStorage returns option to set local object storage of Replicator.
func WithLogger ¶
WithLogger returns option to set Logger of Replicator.
func WithPutTimeout ¶
WithPutTimeout returns option to set Put timeout of Replicator.
func WithRemoteSender ¶
func WithRemoteSender(v *putsvc.RemoteSender) Option
WithRemoteSender returns option to set remote object sender of Replicator.
type Replicator ¶
type Replicator struct {
// contains filtered or unexported fields
}
Replicator represents the utility that replicates local objects to remote nodes.
func New ¶
func New(opts ...Option) *Replicator
New creates, initializes and returns Replicator instance.
func (*Replicator) AddTask ¶
func (p *Replicator) AddTask(t *Task)
AddTask pushes replication task to Replicator queue.
If task queue is full, log message is written.
func (*Replicator) HandleTask ¶ added in v0.27.0
func (p *Replicator) HandleTask(ctx context.Context, task *Task)
HandleTask executes replication task inside invoking goroutine.
func (*Replicator) Run ¶
func (p *Replicator) Run(ctx context.Context)
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
Task represents group of Replicator task parameters.
func (*Task) WithCopiesNumber ¶
WithCopiesNumber sets number of copies to replicate.
func (*Task) WithObjectAddress ¶
func (t *Task) WithObjectAddress(v *addressSDK.Address) *Task
WithObjectAddress sets address of local object.