gate

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2020 License: Apache-2.0 Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gate

type Gate interface {
	Start(ctx context.Context) error
	Done()
}

Gate is an interface that mimics prometheus/pkg/gate behavior.

type Keeper added in v0.14.0

type Keeper struct {
	// contains filtered or unexported fields
}

Keeper is used to create multiple gates sharing the same metrics.

func NewKeeper added in v0.14.0

func NewKeeper(reg prometheus.Registerer) *Keeper

NewKeeper creates a new Keeper.

func (*Keeper) NewGate added in v0.14.0

func (k *Keeper) NewGate(maxConcurrent int) Gate

NewGate returns a new Gate that collects metrics.

Jump to

Keyboard shortcuts

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