Documentation ¶
Index ¶
- type BuryFunc
- type KeySpaceIterator
- type LocalObjectGetFunc
- type LocalObjectHeaderFunc
- type MetricsRegister
- type Option
- func WithBuryFunc(f BuryFunc) Option
- func WithContainerSource(v container.Source) Option
- func WithHeadTimeout(v time.Duration) Option
- func WithKeySpaceIterator(it KeySpaceIterator) Option
- func WithKeyStorage(ks *util.KeyStorage) Option
- func WithLocalObjectGetFunc(v LocalObjectGetFunc) Option
- func WithLocalObjectHeaderFunc(v LocalObjectHeaderFunc) Option
- func WithLogger(v *logger.Logger) Option
- func WithMetrics(m MetricsRegister) Option
- func WithNetmapKeys(v netmap.AnnouncedKeys) Option
- func WithPlacementBuilder(v placement.Builder) Option
- func WithPool(p *ants.Pool) Option
- func WithRedundantCopyCallback(cb RedundantCopyCallback) Option
- func WithRemoteObjectGetFunc(v RemoteObjectGetFunc) Option
- func WithRemoteObjectHeaderFunc(v RemoteObjectHeaderFunc) Option
- func WithReplicator(v Replicator) Option
- type Policer
- type RedundantCopyCallback
- type RemoteObjectGetFunc
- type RemoteObjectHeaderFunc
- type Replicator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeySpaceIterator ¶ added in v0.37.0
type KeySpaceIterator interface { Next(context.Context, uint32) ([]objectcore.Info, error) Rewind() }
KeySpaceIterator is the interface that allows iterating over the key space of local storage. Note that the underlying implementation might be circular: i.e. it can restart when the end of the key space is reached.
type LocalObjectGetFunc ¶ added in v0.40.0
type LocalObjectHeaderFunc ¶ added in v0.40.0
LocalObjectHeaderFunc is the function to obtain HEAD info from the current node.
type MetricsRegister ¶ added in v0.38.0
type MetricsRegister interface {
IncProcessedObjects()
}
type Option ¶
type Option func(*cfg)
Option is an option for Policer constructor.
func WithBuryFunc ¶ added in v0.37.0
func WithContainerSource ¶
WithContainerSource returns option to set container source of Policer.
func WithHeadTimeout ¶
WithHeadTimeout returns option to set Head timeout of Policer.
func WithKeySpaceIterator ¶ added in v0.37.0
func WithKeySpaceIterator(it KeySpaceIterator) Option
func WithKeyStorage ¶ added in v0.40.0
func WithKeyStorage(ks *util.KeyStorage) Option
func WithLocalObjectGetFunc ¶ added in v0.40.0
func WithLocalObjectGetFunc(v LocalObjectGetFunc) Option
func WithLocalObjectHeaderFunc ¶ added in v0.40.0
func WithLocalObjectHeaderFunc(v LocalObjectHeaderFunc) Option
WithLocalObjectHeaderFunc returns option to set local object header receiver of Policer.
func WithLogger ¶
WithLogger returns option to set Logger of Policer.
func WithMetrics ¶ added in v0.38.0
func WithMetrics(m MetricsRegister) Option
WithMetrics returns option to set metrics.
func WithNetmapKeys ¶
func WithNetmapKeys(v netmap.AnnouncedKeys) Option
WithNetmapKeys returns option to set tool to work with announced public keys.
func WithPlacementBuilder ¶
WithPlacementBuilder returns option to set object placement builder of Policer.
func WithPool ¶
func WithPool(p *ants.Pool) Option
WithPool returns option to set pool for policy and replication operations.
func WithRedundantCopyCallback ¶
func WithRedundantCopyCallback(cb RedundantCopyCallback) Option
WithRedundantCopyCallback returns option to set callback to pass redundant local object copies detected by Policer.
func WithRemoteObjectGetFunc ¶ added in v0.40.0
func WithRemoteObjectGetFunc(v RemoteObjectGetFunc) Option
func WithRemoteObjectHeaderFunc ¶ added in v0.37.0
func WithRemoteObjectHeaderFunc(v RemoteObjectHeaderFunc) Option
WithRemoteObjectHeader returns option to set remote object header receiver of Policer.
func WithReplicator ¶
func WithReplicator(v Replicator) Option
WithReplicator returns option to set object replicator of Policer.
type Policer ¶
type Policer struct {
// contains filtered or unexported fields
}
Policer represents the utility that verifies compliance with the object storage policy.
type RedundantCopyCallback ¶
RedundantCopyCallback is a callback to pass the redundant local copy of the object.
type RemoteObjectGetFunc ¶ added in v0.40.0
type RemoteObjectHeaderFunc ¶ added in v0.37.0
type RemoteObjectHeaderFunc func(context.Context, netmapSDK.NodeInfo, oid.Address, bool) (*objectSDK.Object, error)
RemoteObjectHeaderFunc is the function to obtain HEAD info from a specific remote node.
type Replicator ¶ added in v0.37.0
type Replicator interface { HandleReplicationTask(ctx context.Context, task replicator.Task, res replicator.TaskResult) HandlePullTask(ctx context.Context, task replicator.Task) HandleLocalPutTask(ctx context.Context, task replicator.Task) }
Replicator is the interface to a consumer of replication tasks.