Documentation ¶
Index ¶
- type Network
- type Option
- func WithContainerSource(v container.Source) Option
- func WithHeadTimeout(v time.Duration) Option
- func WithLocalStorage(v *engine.StorageEngine) Option
- func WithLogger(v *zap.Logger) Option
- func WithMaxCapacity(capacity uint32) Option
- func WithNetmapKeys(v netmap.AnnouncedKeys) Option
- func WithNetwork(n Network) Option
- func WithNodeLoader(l nodeLoader) Option
- func WithObjectBatchSize(s uint32) Option
- func WithPlacementBuilder(v placement.Builder) Option
- func WithPool(p *ants.Pool) Option
- func WithRedundantCopyCallback(cb RedundantCopyCallback) Option
- func WithRemoteHeader(v *headsvc.RemoteHeader) Option
- func WithReplicationCooldown(d time.Duration) Option
- func WithReplicator(v *replicator.Replicator) Option
- type Policer
- type RedundantCopyCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Network ¶
type Network interface { // IsLocalNodeInNetmap checks whether the local node belongs to the current // network map. If it is impossible to check this fact, IsLocalNodeInNetmap // returns false. IsLocalNodeInNetmap() bool }
Network provides information about the NeoFS network to Policer for work.
type Option ¶
type Option func(*cfg)
Option is an option for Policer constructor.
func WithContainerSource ¶
WithContainerSource returns option to set container source of Policer.
func WithHeadTimeout ¶
WithHeadTimeout returns option to set Head timeout of Policer.
func WithLocalStorage ¶
func WithLocalStorage(v *engine.StorageEngine) Option
WithLocalStorage returns option to set local object storage of Policer.
func WithLogger ¶
WithLogger returns option to set Logger of Policer.
func WithMaxCapacity ¶
WithMaxCapacity returns option to set max capacity that can be set to the pool.
func WithNetmapKeys ¶
func WithNetmapKeys(v netmap.AnnouncedKeys) Option
WithNetmapKeys returns option to set tool to work with announced public keys.
func WithNodeLoader ¶
func WithNodeLoader(l nodeLoader) Option
WithNodeLoader returns option to set NeoFS node load source.
func WithObjectBatchSize ¶
WithObjectBatchSize returns option to set maximum objects read from the Storage at once.
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 WithRemoteHeader ¶
func WithRemoteHeader(v *headsvc.RemoteHeader) Option
WithRemoteHeader returns option to set object header receiver of Policer.
func WithReplicationCooldown ¶
WithReplicationCooldown returns option to set replication cooldown: the Policer will not submit more than one task per a provided time duration.
func WithReplicator ¶
func WithReplicator(v *replicator.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.
func (*Policer) Reload ¶
Reload allows runtime reconfiguration for the following parameters: - WithHeadTimeout; - [WithObjectCacheTime]; - WithReplicationCooldown; - WithMaxCapacity; - WithObjectBatchSize; - [WithObjectCacheSize].
type RedundantCopyCallback ¶
RedundantCopyCallback is a callback to pass the redundant local copy of the object.