client

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: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConnectionFailure = stream.ErrConnectionFailure
View Source
var ErrRegistrationFailure = stream.ErrRegistrationFailure

Functions

This section is empty.

Types

type Client

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

func New

func New(uid string, clientOptions ...Option) *Client

func (*Client) Close

func (c *Client) Close(timeout time.Duration) error

func (*Client) ConfigureSampler

func (c *Client) ConfigureSampler(ctx context.Context, samplerResource, samplerName string, update *control.SamplerConfigUpdate) error

ConfigureSampler sends a configuration to a sampler

func (*Client) Connect

func (c *Client) Connect(serverAddr string) error

func (*Client) Errors

func (c *Client) Errors() chan error

func (*Client) ListSamplers

func (c *Client) ListSamplers(ctx context.Context) ([]*control.Sampler, error)

func (*Client) State

func (c *Client) State() State

func (*Client) StateChanges

func (c *Client) StateChanges() chan State

func (*Client) UID

func (c *Client) UID() control.ClientUID

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 WithBlock

func WithBlock() Option

func WithConnTimeout

func WithConnTimeout(t time.Duration) 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

type State

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

func NewStateFromStreamState

func NewStateFromStreamState(st stream.State) State

func (State) String

func (s State) String() string

Jump to

Keyboard shortcuts

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