Documentation
¶
Index ¶
- Variables
- type ClientRegistry
- type Registry
- type SamplerRegistry
- func (sr *SamplerRegistry) Close()
- func (sr *SamplerRegistry) DeleteSamplerConfig(resource string, name string) error
- func (sr *SamplerRegistry) Deregister(uid control.SamplerUID) error
- func (sr *SamplerRegistry) Events() chan event.Event
- func (sr *SamplerRegistry) GetRegisteredInstances() []*defs.SamplerInstance
- func (sr *SamplerRegistry) GetSampler(resource string, name string) (*defs.Sampler, error)
- func (sr *SamplerRegistry) RangeRegisteredInstances(fn func(sampler *defs.Sampler, instance *defs.SamplerInstance) (carryon bool))
- func (sr *SamplerRegistry) RangeSamplers(fn func(sampler *defs.Sampler) (carryon bool))
- func (sr *SamplerRegistry) Register(resource string, name string, tags []control.Tag, ...) error
- func (sr *SamplerRegistry) UpdateSamplerConfig(resource string, name string, update control.SamplerConfigUpdate) error
- func (sr *SamplerRegistry) UpdateStats(resource string, name string, uid control.SamplerUID, ...) error
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
type Registry ¶ added in v0.1.0
type Registry struct {
Client *ClientRegistry
Sampler *SamplerRegistry
}
type SamplerRegistry ¶ added in v0.1.0
type SamplerRegistry struct {
// contains filtered or unexported fields
}
func NewSamplerRegistry ¶ added in v0.1.0
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 (*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
Click to show internal directories.
Click to hide internal directories.