client

package
v0.15.4-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReconnectRetryAttempts     = 6
	ReconnectRetryAttemptDelay = 1 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func Connect

func Connect(ctx context.Context, endpoint string, opts ...Option) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) OnConnectionClosed

func (c *Client) OnConnectionClosed(listener func(context.Context, *proto.ShutdownRequest) error)

func (*Client) OnDataStoreTestConnectionRequest

func (c *Client) OnDataStoreTestConnectionRequest(listener func(context.Context, *proto.DataStoreConnectionTestRequest) error)

func (*Client) OnOTLPConnectionTest added in v0.15.4

func (c *Client) OnOTLPConnectionTest(listener func(context.Context, *proto.OTLPConnectionTestRequest) error)

func (*Client) OnPollingRequest

func (c *Client) OnPollingRequest(listener func(context.Context, *proto.PollingRequest) error)

func (*Client) OnStopRequest added in v0.15.4

func (c *Client) OnStopRequest(listener func(context.Context, *proto.StopRequest) error)

func (*Client) OnTriggerRequest

func (c *Client) OnTriggerRequest(listener func(context.Context, *proto.TriggerRequest) error)

func (*Client) SendDataStoreConnectionResult

func (c *Client) SendDataStoreConnectionResult(ctx context.Context, response *proto.DataStoreConnectionTestResponse) error

func (*Client) SendOTLPConnectionResult added in v0.15.4

func (c *Client) SendOTLPConnectionResult(ctx context.Context, response *proto.OTLPConnectionTestResponse) error

func (*Client) SendTrace

func (c *Client) SendTrace(ctx context.Context, pollingResponse *proto.PollingResponse) error

func (*Client) SendTriggerResponse

func (c *Client) SendTriggerResponse(ctx context.Context, response *proto.TriggerResponse) error

func (*Client) SessionConfiguration

func (c *Client) SessionConfiguration() *SessionConfig

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

func (*Client) WaitUntilDisconnected

func (c *Client) WaitUntilDisconnected()

type Config

type Config struct {
	APIKey     string
	AgentName  string
	PingPeriod time.Duration
}

type Option

type Option func(*Client)

func WithAPIKey

func WithAPIKey(apiKey string) Option

func WithAgentName

func WithAgentName(name string) Option

func WithLogger added in v0.14.7

func WithLogger(logger *zap.Logger) Option

func WithPingPeriod added in v0.14.7

func WithPingPeriod(period time.Duration) Option

type SessionConfig

type SessionConfig struct {
	BatchTimeout        time.Duration
	AgentIdentification *proto.AgentIdentification
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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