policer

package
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

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 WithContainerSource

func WithContainerSource(v container.Source) Option

WithContainerSource returns option to set container source of Policer.

func WithExpansionRate

func WithExpansionRate(v int) Option

WithExpansionRate returns option to set expansion rate of Policer's works scope (in %).

func WithHeadTimeout

func WithHeadTimeout(v time.Duration) Option

WithHeadTimeout returns option to set Head timeout of Policer.

func WithLocalAddressSource

func WithLocalAddressSource(v network.LocalAddressSource) Option

WithLocalAddressSource returns option to set local address source of Policer.

func WithLocalStorage

func WithLocalStorage(v *engine.StorageEngine) Option

WithLocalStorage returns option to set local object storage of Policer.

func WithLogger

func WithLogger(v *logger.Logger) Option

WithLogger returns option to set Logger of Policer.

func WithPlacementBuilder

func WithPlacementBuilder(v placement.Builder) Option

WithPlacementBuilder returns option to set object placement builder of Policer.

func WithRedundantCopyCallback added in v0.16.0

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 WithReplicator

func WithReplicator(v *replicator.Replicator) Option

WithReplicator returns option to set object replicator of Policer.

func WithTrigger

func WithTrigger(v <-chan *Task) Option

WithTrigger returns option to set triggering channel of Policer.

func WithWorkScope

func WithWorkScope(v int) Option

WithWorkScope returns option to set job work scope value 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 New

func New(opts ...Option) *Policer

New creates, initializes and returns Policer instance.

func (*Policer) Run

func (p *Policer) Run(ctx context.Context)

type RedundantCopyCallback added in v0.16.0

type RedundantCopyCallback func(*object.Address)

RedundantCopyCallback is a callback to pass the redundant local copy of the object.

type Task

type Task struct{}

Task represents group of Policer tact parameters.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL