client

package
v0.0.0-...-ed06964 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

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) OnPollingRequest

func (c *Client) OnPollingRequest(listener func(context.Context, *proto.PollingRequest) 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) 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
}

type Option

type Option func(*Client)

func WithAPIKey

func WithAPIKey(apiKey string) Option

func WithAgentName

func WithAgentName(name string) 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