client

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnableToConnect is error when client is unable connect to rpc server
	ErrUnableToConnect = errors.New("unable to connect Talaria server")
)

Functions

This section is empty.

Types

type Client

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

Client represents a client for Talaria.

func Dial

func Dial(address string, options ...Option) (*Client, error)

Dial creates a new client and connect to Talaria grpc server.

func (*Client) Close

func (c *Client) Close() error

Close connection

func (*Client) IngestBatch

func (c *Client) IngestBatch(ctx context.Context, batch []Event) error

IngestBatch sends a batch of events to Talaria server.

func (*Client) IngestBatchWithTable added in v1.6.1

func (c *Client) IngestBatchWithTable(ctx context.Context, batch []Event, tables []string) error

IngestBatch sends a batch of events to Talaria server.

func (*Client) IngestCSV added in v1.1.6

func (c *Client) IngestCSV(ctx context.Context, data []byte) error

IngestCSV sends a set of comma-separated file to Talaria to ingest.

func (*Client) IngestORC added in v1.1.6

func (c *Client) IngestORC(ctx context.Context, data []byte) error

IngestORC sends an ORC-encoded file to Talaria to ingest.

func (*Client) IngestParquet added in v1.2.7

func (c *Client) IngestParquet(ctx context.Context, data []byte) error

IngestParquet sends an Parquet-encoded file to Talaria to ingest.

func (*Client) IngestURL added in v1.1.6

func (c *Client) IngestURL(ctx context.Context, url string) error

IngestURL sends a request to Talaria to ingest a file from a specific URL.

type Event

type Event map[string]interface{}

Event represents a single event.

type Option

type Option func(client *Client)

Option is a functional parameter used to configure the client.

func WithCircuit

func WithCircuit(timeout time.Duration, maxConcurrent, errorThresholdPercent int) Option

WithCircuit specifies the configuration for the circuit breaker.

func WithCredential

func WithCredential(credentials credentials.TransportCredentials) Option

WithCredential specfies the configuration for the gRPC credentials based on TLS with this one being set, connection will be created in secure manner

func WithLoadBalancer added in v1.2.5

func WithLoadBalancer(name string) Option

WithLoadBalancer specifies the load balancer to use

func WithMaxMsgSize added in v1.6.1

func WithMaxMsgSize(maxSendMsgSize, maxRecvMsgSize int) Option

func WithNetwork

func WithNetwork(dialTimeout time.Duration) Option

WithNetwork specifies the configuration for a connection.

func WithNonBlock

func WithNonBlock() Option

WithNonBlock creates a non-blocking gRPC dial()

Jump to

Keyboard shortcuts

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