servicegetter

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: Apache-2.0 Imports: 9 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
	Entities       *entities.Entities
	EntityTrackers *entities.EntityTrackers
	Metrics        *Metrics `optional:"true"`
}

FxIn are FX arguments to ProvideFromEntities.

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
	ServicesFromSocketAddress(addr *corev3.SocketAddress) []string
	ServicesFromAddress(addr string) []string
}

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

func FromEntities added in v0.26.0

func FromEntities(ec *entities.Entities) ServiceGetter

FromEntities creates a new Entities-powered ServiceGetter.

func NewEmpty

func NewEmpty() ServiceGetter

NewEmpty creates a new ServiceGetter that always returns nil.

func ProvideFromEntities added in v0.26.0

func ProvideFromEntities(in FxIn) ServiceGetter

ProvideFromEntities provides an Entities-powered ServiceGetter.

Jump to

Keyboard shortcuts

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