client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: Apache-2.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndOffset

func EndOffset(info *flight.FlightInfo) ([]byte, error)

EndOffset extracts the snapshot handoff offset from a snapshot FlightInfo's app_metadata (contract §6/§7).

func UnauthError

func UnauthError(err error) bool

Types

type Client

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

Client is a plugin Flight client with auth, heartbeat, and health monitoring. No mutex around RPCs: grpc.ClientConn is safe for concurrent use and multiplexes over HTTP/2. A shared lock would starve the heartbeat during long DoPuts — liveness never waits on the data path.

func Connect

func Connect(ctx context.Context, addr, token string, logger *slog.Logger) (*Client, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) Dead

func (c *Client) Dead() <-chan struct{}

func (*Client) DeadErr

func (c *Client) DeadErr() error

func (*Client) DoGet

func (*Client) DoPut

func (c *Client) DoPut(ctx context.Context, desc contract.DoPutRequest, schema *arrow.Schema, records []arrow.RecordBatch) error

DoPut writes records to a sink (contract §10). Uses flight.NewRecordWriter for correct wire format. Drains ack stream to surface sink errors.

func (*Client) EnsureTable added in v0.5.0

func (c *Client) EnsureTable(ctx context.Context, req contract.EnsureTableRequest) error

EnsureTable hands the plugin sink the table's schema, primary key and write mode (issue #569). An older plugin that does not implement the action returns Unimplemented, which the caller treats as "nothing to do".

func (*Client) Flush

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

func (*Client) GetFlightInfo

func (c *Client) GetFlightInfo(ctx context.Context, req contract.GetFlightInfoRequest) (*flight.FlightInfo, error)

func (*Client) GetSchema

func (c *Client) GetSchema(ctx context.Context, req contract.GetFlightInfoRequest) (*arrow.Schema, error)

func (*Client) Healthy

func (c *Client) Healthy() bool

func (*Client) ListActions

func (c *Client) ListActions(ctx context.Context) ([]*flight.ActionType, error)

func (*Client) ListTables

func (c *Client) ListTables(ctx context.Context) (*contract.ListTablesResponse, error)

func (*Client) Position added in v0.5.0

func (c *Client) Position(ctx context.Context, table string) (string, error)

Position reads the plugin sink's committed position for a table (issue #569). Empty means never written.

func (*Client) Shutdown

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

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*contract.StatusResponse, error)

Jump to

Keyboard shortcuts

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