sampler

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

This section is empty.

Functions

This section is empty.

Types

type ConfigUpdate

type ConfigUpdate struct {
	Config control.SamplerConfig
}

func (ConfigUpdate) String

func (p ConfigUpdate) String() string

type Event

type Event interface {
	fmt.Stringer
	// contains filtered or unexported methods
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WihKeepAliveMaxPeriod

func WihKeepAliveMaxPeriod(t time.Duration) Option

func WithAuthBearer

func WithAuthBearer(token string) Option

func WithConnTimeout

func WithConnTimeout(t time.Duration) Option

func WithInitialConfig added in v0.1.0

func WithInitialConfig(c control.SamplerConfigUpdate) Option

func WithLogger

func WithLogger(l logging.Logger) Option

func WithResponseTimeout

func WithResponseTimeout(t time.Duration) Option

func WithServerReqsQueueLen

func WithServerReqsQueueLen(l int) Option

func WithTLS

func WithTLS() Option

func WithTLSCACert

func WithTLSCACert(path string) Option

func WithTags added in v0.3.0

func WithTags(tags ...control.Tag) Option

type Sampler

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

func New

func New(name, resource string, options ...Option) *Sampler

func (*Sampler) Close

func (p *Sampler) Close(timeout time.Duration) error

func (*Sampler) Config

func (p *Sampler) Config() control.SamplerConfig

func (*Sampler) Connect

func (p *Sampler) Connect(serverAddr string) error

func (*Sampler) Events

func (p *Sampler) Events() chan Event

func (*Sampler) Name

func (p *Sampler) Name() string

func (*Sampler) State

func (p *Sampler) State() State

func (*Sampler) UID

func (p *Sampler) UID() control.SamplerUID

func (*Sampler) UpdateStats

func (p *Sampler) UpdateStats(ctx context.Context, stats control.SamplerSamplingStats) error

type State

type State int
const (
	Unknown State = iota
	Unregistered
	Registering
	Registered
)

func NewStateFromStreamState

func NewStateFromStreamState(st stream.State) State

func (State) String

func (s State) String() string

type StateUpdate

type StateUpdate struct {
	State State
}

func (StateUpdate) String

func (p StateUpdate) String() string

Jump to

Keyboard shortcuts

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