client

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2025 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrForwardRequired

type ErrForwardRequired struct {
	TargetNodeID string
	TargetAddr   string
}

ErrForwardRequired is returned when a request needs to be routed to another node

func IsForwardRequired

func IsForwardRequired(err error) *ErrForwardRequired

IsForwardRequired checks if an error is a "FORWARD_REQUIRED" error If success, returns the parsed error struct, otherwise nil

func (*ErrForwardRequired) Error

func (e *ErrForwardRequired) Error() string

type SmartClient

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

SmartClient is a wrapper around flight.Client that handles strict sharding redirects

func NewSmartClient

func NewSmartClient(addr string) (*SmartClient, error)

NewSmartClient creates a new smart client connected to the initial address

func (*SmartClient) Close

func (c *SmartClient) Close() error

Close closes all active connections

func (*SmartClient) DoGet

DoGet performs a Flight DoGet with automatic redirection handling

func (*SmartClient) DoPut

DoPut performs a Flight DoPut with automatic redirection handling (best-effort)

func (*SmartClient) GetFlightInfo

func (c *SmartClient) GetFlightInfo(ctx context.Context, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)

GetFlightInfo gets flight info with redirect handling

Jump to

Keyboard shortcuts

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