registry

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownSampler         = errors.New("unknown sampler")
	ErrUnknownSamplerInstance = errors.New("unknown sampler instance")
)
View Source
var (
	ErrUnkownClient = errors.New("unknown client")
)

Functions

This section is empty.

Types

type ClientRegistry added in v0.1.0

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

func NewClientRegistry added in v0.1.0

func NewClientRegistry(logger logging.Logger) (*ClientRegistry, error)

func (*ClientRegistry) Deregister added in v0.1.0

func (cr *ClientRegistry) Deregister(UID control.ClientUID) error

func (*ClientRegistry) Register added in v0.1.0

func (cr *ClientRegistry) Register(uid control.ClientUID) error

type Registry added in v0.1.0

type Registry struct {
	Client  *ClientRegistry
	Sampler *SamplerRegistry
}

func NewRegistry added in v0.1.0

func NewRegistry(logger logging.Logger, notifyDirty chan struct{}, storageOpts storage.Options) (*Registry, error)

type SamplerRegistry added in v0.1.0

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

func NewSamplerRegistry added in v0.1.0

func NewSamplerRegistry(logger logging.Logger, notifyDirty chan struct{}, storageOpts storage.Options) (*SamplerRegistry, error)

func (*SamplerRegistry) Close added in v0.1.0

func (sr *SamplerRegistry) Close()

func (*SamplerRegistry) DeleteSamplerConfig added in v0.1.0

func (sr *SamplerRegistry) DeleteSamplerConfig(resource string, name string) error

func (*SamplerRegistry) Deregister added in v0.1.0

func (sr *SamplerRegistry) Deregister(uid control.SamplerUID) error

func (*SamplerRegistry) Events added in v0.1.0

func (sr *SamplerRegistry) Events() chan event.Event

Events returns a new channel that will be populated with the sampler configs. Events will contain the initial state and posterior updates CAUTION: Not reading from the returned channel until it gets closed will block the registry

func (*SamplerRegistry) GetRegisteredInstances added in v0.1.0

func (sr *SamplerRegistry) GetRegisteredInstances() []*defs.SamplerInstance

func (*SamplerRegistry) GetSampler added in v0.1.0

func (sr *SamplerRegistry) GetSampler(resource string, name string) (*defs.Sampler, error)

func (*SamplerRegistry) RangeRegisteredInstances added in v0.1.0

func (sr *SamplerRegistry) RangeRegisteredInstances(fn func(sampler *defs.Sampler, instance *defs.SamplerInstance) (carryon bool))

RangeRegisteredInstances locks the registry until all the instances have been processed CAUTION: do not perform any action that may require registry access or it may cause a deadlock

func (*SamplerRegistry) RangeSamplers added in v0.1.0

func (sr *SamplerRegistry) RangeSamplers(fn func(sampler *defs.Sampler) (carryon bool))

RangeSamplers locks the registry until all the configs have been processed CAUTION: do not perform any action that may require registry access or it may cause a deadlock

func (*SamplerRegistry) Register added in v0.1.0

func (sr *SamplerRegistry) Register(resource string, name string,
	tags []control.Tag, initialConfig control.SamplerConfig,
	uid control.SamplerUID, conn defs.SamplerConn,
) error

func (*SamplerRegistry) UpdateSamplerConfig added in v0.1.0

func (sr *SamplerRegistry) UpdateSamplerConfig(resource string, name string, update control.SamplerConfigUpdate) error

func (*SamplerRegistry) UpdateStats added in v0.1.0

func (sr *SamplerRegistry) UpdateStats(resource string, name string, uid control.SamplerUID, newStats control.SamplerSamplingStats) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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