client

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

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