servicegetter

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Module is a set of default providers for servicegetter components.

Functions

This section is empty.

Types

type FxIn

type FxIn struct {
	fx.In
	Lifecycle      fx.Lifecycle
	EntityCache    *entitycache.EntityCache
	EntityTrackers *entitycache.EntityTrackers
	Metrics        *Metrics `optional:"true"`
}

FxIn are FX arguments to ProvideFromEntityCache.

type Metrics

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

Metrics is used for collecting metrics about servicegetter

nil value of Metrics should be always usable.

func NewMetrics

func NewMetrics(registry *prometheus.Registry) (*Metrics, error)

NewMetrics creates new Metrics, registering counters in given registry.

type ServiceGetter

type ServiceGetter interface {
	ServicesFromContext(ctx context.Context) []string
}

ServiceGetter can be used to query services based on client context.

func FromEntityCache

func FromEntityCache(ec *entitycache.EntityCache) ServiceGetter

FromEntityCache creates a new EntityCache-powered ServiceGetter.

func NewEmpty

func NewEmpty() ServiceGetter

NewEmpty creates a new ServiceGetter that always returns nil.

func ProvideFromEntityCache

func ProvideFromEntityCache(in FxIn) ServiceGetter

ProvideFromEntityCache provides an EntityCache-powered ServiceGetter.

Jump to

Keyboard shortcuts

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