metrics

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 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 Collector

type Collector interface {
	Start(ctx context.Context)
	UpdateSpaceUsage()

	SetCounter(ObjectCounter)
	SetIterator(iter meta.Iterator)
	UpdateContainer(cid refs.CID, size uint64, op SpaceOp)
}

Collector is an interface of the metrics collector.

func New

func New(p Params) (Collector, error)

New constructs metrics collector and returns Collector interface.

type CounterSetter

type CounterSetter interface {
	SetCounter(ObjectCounter)
}

CounterSetter is an interface of ObjectCounter container.

type ObjectCounter

type ObjectCounter interface {
	ObjectsCount() (uint64, error)
}

ObjectCounter is an interface of object number storage.

type Params

type Params struct {
	Options      []string
	Logger       *zap.Logger
	Interval     time.Duration
	MetricsStore core.Bucket
}

Params groups the parameters of metrics collector's constructor.

type SpaceOp

type SpaceOp int

SpaceOp is an enumeration of space size operations.

const (

	// AddSpace is a SpaceOp of space size increasing.
	AddSpace SpaceOp

	// RemSpace is a SpaceOp of space size decreasing.
	RemSpace
)

Jump to

Keyboard shortcuts

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