Documentation
¶
Index ¶
- type ErrForwardRequired
- type SmartClient
- func (c *SmartClient) Close() error
- func (c *SmartClient) DoGet(ctx context.Context, ticket []byte) (flight.FlightService_DoGetClient, error)
- func (c *SmartClient) DoPut(ctx context.Context, desc *flight.FlightDescriptor) (flight.FlightService_DoPutClient, error)
- func (c *SmartClient) GetFlightInfo(ctx context.Context, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrForwardRequired ¶
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) DoGet ¶
func (c *SmartClient) DoGet(ctx context.Context, ticket []byte) (flight.FlightService_DoGetClient, error)
DoGet performs a Flight DoGet with automatic redirection handling
func (*SmartClient) DoPut ¶
func (c *SmartClient) DoPut(ctx context.Context, desc *flight.FlightDescriptor) (flight.FlightService_DoPutClient, error)
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
Click to show internal directories.
Click to hide internal directories.