Documentation ¶
Index ¶
- type BuryFunc
- type KeySpaceIterator
- 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 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 WithRemoteObjectHeaderFunc(v RemoteObjectHeaderFunc) Option
- func WithReplicator(v Replicator) Option
- type Policer
- type RedundantCopyCallback
- 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.AddressWithType, 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 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 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 WithRemoteObjectHeaderFunc ¶ added in v0.37.0
func WithRemoteObjectHeaderFunc(v RemoteObjectHeaderFunc) Option
WithRemoteObjectHeader returns option to set 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 RemoteObjectHeaderFunc ¶ added in v0.37.0
type RemoteObjectHeaderFunc func(context.Context, netmapSDK.NodeInfo, oid.Address) (*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 {
HandleTask(ctx context.Context, task replicator.Task, res replicator.TaskResult)
}
Replicator is the interface to a consumer of replication tasks.