Documentation
¶
Index ¶
- Constants
- Variables
- func MarkDurableReconnectTerminal(err error) error
- type Config
- type ControlPlaneFlightSQLHandler
- func (h *ControlPlaneFlightSQLHandler) BeginTransaction(ctx context.Context, req flightsql.ActionBeginTransactionRequest) ([]byte, error)
- func (h *ControlPlaneFlightSQLHandler) ClosePreparedStatement(ctx context.Context, req flightsql.ActionClosePreparedStatementRequest) error
- func (h *ControlPlaneFlightSQLHandler) CloseSession(ctx context.Context, req *flight.CloseSessionRequest) (*flight.CloseSessionResult, error)
- func (h *ControlPlaneFlightSQLHandler) CreatePreparedStatement(ctx context.Context, req flightsql.ActionCreatePreparedStatementRequest) (flightsql.ActionCreatePreparedStatementResult, error)
- func (h *ControlPlaneFlightSQLHandler) DoGetDBSchemas(ctx context.Context, cmd flightsql.GetDBSchemas) (*arrow.Schema, <-chan flight.StreamChunk, error)
- func (h *ControlPlaneFlightSQLHandler) DoGetPreparedStatement(ctx context.Context, cmd flightsql.PreparedStatementQuery) (*arrow.Schema, <-chan flight.StreamChunk, error)
- func (h *ControlPlaneFlightSQLHandler) DoGetStatement(ctx context.Context, ticket flightsql.StatementQueryTicket) (*arrow.Schema, <-chan flight.StreamChunk, error)
- func (h *ControlPlaneFlightSQLHandler) DoGetTables(ctx context.Context, cmd flightsql.GetTables) (*arrow.Schema, <-chan flight.StreamChunk, error)
- func (h *ControlPlaneFlightSQLHandler) DoPutCommandStatementUpdate(ctx context.Context, cmd flightsql.StatementUpdate) (int64, error)
- func (h *ControlPlaneFlightSQLHandler) EndTransaction(ctx context.Context, req flightsql.ActionEndTransactionRequest) error
- func (h *ControlPlaneFlightSQLHandler) GetFlightInfoPreparedStatement(ctx context.Context, cmd flightsql.PreparedStatementQuery, ...) (*flight.FlightInfo, error)
- func (h *ControlPlaneFlightSQLHandler) GetFlightInfoSchemas(ctx context.Context, cmd flightsql.GetDBSchemas, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
- func (h *ControlPlaneFlightSQLHandler) GetFlightInfoStatement(ctx context.Context, cmd flightsql.StatementQuery, ...) (*flight.FlightInfo, error)
- func (h *ControlPlaneFlightSQLHandler) GetFlightInfoTables(ctx context.Context, cmd flightsql.GetTables, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
- type CredentialValidator
- type DurableSessionMetadata
- type DurableSessionRecord
- type DurableSessionState
- type DurableSessionStore
- type FlightIngress
- type FuncCredentialValidator
- type Hooks
- type MapCredentialValidator
- type Options
- type SessionProvider
Constants ¶
View Source
const ( ReapTriggerPeriodic = "periodic" ReapTriggerForced = "forced" )
Variables ¶
View Source
var ErrDurableReconnectTerminal = errors.New("durable reconnect terminal")
Functions ¶
Types ¶
type ControlPlaneFlightSQLHandler ¶
type ControlPlaneFlightSQLHandler struct {
flightsql.BaseServer
// contains filtered or unexported fields
}
ControlPlaneFlightSQLHandler implements Flight SQL over control-plane sessions.
func NewControlPlaneFlightSQLHandler ¶
func NewControlPlaneFlightSQLHandler(sessions *flightAuthSessionStore, validator CredentialValidator) (*ControlPlaneFlightSQLHandler, error)
func (*ControlPlaneFlightSQLHandler) BeginTransaction ¶
func (h *ControlPlaneFlightSQLHandler) BeginTransaction(ctx context.Context, req flightsql.ActionBeginTransactionRequest) ([]byte, error)
func (*ControlPlaneFlightSQLHandler) ClosePreparedStatement ¶
func (h *ControlPlaneFlightSQLHandler) ClosePreparedStatement(ctx context.Context, req flightsql.ActionClosePreparedStatementRequest) error
func (*ControlPlaneFlightSQLHandler) CloseSession ¶
func (h *ControlPlaneFlightSQLHandler) CloseSession(ctx context.Context, req *flight.CloseSessionRequest) (*flight.CloseSessionResult, error)
func (*ControlPlaneFlightSQLHandler) CreatePreparedStatement ¶
func (h *ControlPlaneFlightSQLHandler) CreatePreparedStatement(ctx context.Context, req flightsql.ActionCreatePreparedStatementRequest) (flightsql.ActionCreatePreparedStatementResult, error)
func (*ControlPlaneFlightSQLHandler) DoGetDBSchemas ¶
func (h *ControlPlaneFlightSQLHandler) DoGetDBSchemas(ctx context.Context, cmd flightsql.GetDBSchemas) (*arrow.Schema, <-chan flight.StreamChunk, error)
func (*ControlPlaneFlightSQLHandler) DoGetPreparedStatement ¶
func (h *ControlPlaneFlightSQLHandler) DoGetPreparedStatement(ctx context.Context, cmd flightsql.PreparedStatementQuery) (*arrow.Schema, <-chan flight.StreamChunk, error)
func (*ControlPlaneFlightSQLHandler) DoGetStatement ¶
func (h *ControlPlaneFlightSQLHandler) DoGetStatement(ctx context.Context, ticket flightsql.StatementQueryTicket) (*arrow.Schema, <-chan flight.StreamChunk, error)
func (*ControlPlaneFlightSQLHandler) DoGetTables ¶
func (h *ControlPlaneFlightSQLHandler) DoGetTables(ctx context.Context, cmd flightsql.GetTables) (*arrow.Schema, <-chan flight.StreamChunk, error)
func (*ControlPlaneFlightSQLHandler) DoPutCommandStatementUpdate ¶
func (h *ControlPlaneFlightSQLHandler) DoPutCommandStatementUpdate(ctx context.Context, cmd flightsql.StatementUpdate) (int64, error)
func (*ControlPlaneFlightSQLHandler) EndTransaction ¶
func (h *ControlPlaneFlightSQLHandler) EndTransaction(ctx context.Context, req flightsql.ActionEndTransactionRequest) error
func (*ControlPlaneFlightSQLHandler) GetFlightInfoPreparedStatement ¶
func (h *ControlPlaneFlightSQLHandler) GetFlightInfoPreparedStatement(ctx context.Context, cmd flightsql.PreparedStatementQuery, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
func (*ControlPlaneFlightSQLHandler) GetFlightInfoSchemas ¶
func (h *ControlPlaneFlightSQLHandler) GetFlightInfoSchemas(ctx context.Context, cmd flightsql.GetDBSchemas, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
func (*ControlPlaneFlightSQLHandler) GetFlightInfoStatement ¶
func (h *ControlPlaneFlightSQLHandler) GetFlightInfoStatement(ctx context.Context, cmd flightsql.StatementQuery, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
func (*ControlPlaneFlightSQLHandler) GetFlightInfoTables ¶
func (h *ControlPlaneFlightSQLHandler) GetFlightInfoTables(ctx context.Context, cmd flightsql.GetTables, desc *flight.FlightDescriptor) (*flight.FlightInfo, error)
type CredentialValidator ¶
CredentialValidator abstracts username/password authentication.
type DurableSessionMetadata ¶
type DurableSessionRecord ¶
type DurableSessionState ¶
type DurableSessionState string
const ( DurableSessionStateActive DurableSessionState = "active" DurableSessionStateClosed DurableSessionState = "closed" DurableSessionStateExpired DurableSessionState = "expired" )
type DurableSessionStore ¶
type FlightIngress ¶
type FlightIngress struct {
// contains filtered or unexported fields
}
FlightIngress serves Arrow Flight SQL on the control plane with Basic auth. It reuses worker sessions via SessionProvider.
func NewFlightIngress ¶
func NewFlightIngress(host string, port int, tlsConfig *tls.Config, validator CredentialValidator, provider SessionProvider, cfg Config, opts Options) (*FlightIngress, error)
func NewFlightIngressFromListener ¶
func NewFlightIngressFromListener(baseListener net.Listener, tlsConfig *tls.Config, validator CredentialValidator, provider SessionProvider, cfg Config, opts Options) (*FlightIngress, error)
func (*FlightIngress) Addr ¶
func (fi *FlightIngress) Addr() string
Addr returns the bound listener address.
func (*FlightIngress) BeginDrain ¶
func (fi *FlightIngress) BeginDrain()
func (*FlightIngress) Healthy ¶
func (fi *FlightIngress) Healthy() bool
func (*FlightIngress) Shutdown ¶
func (fi *FlightIngress) Shutdown()
Shutdown stops accepting new Flight connections and cleans up sessions.
func (*FlightIngress) Start ¶
func (fi *FlightIngress) Start()
Start begins serving in the background.
func (*FlightIngress) WaitForZeroSessions ¶
func (fi *FlightIngress) WaitForZeroSessions(ctx context.Context) bool
type FuncCredentialValidator ¶
FuncCredentialValidator wraps a function (multi-tenant config store).
func (FuncCredentialValidator) ValidateCredentials ¶
func (f FuncCredentialValidator) ValidateCredentials(username, password string) bool
type MapCredentialValidator ¶
MapCredentialValidator wraps a static users map (single-tenant / tests).
func (*MapCredentialValidator) ValidateCredentials ¶
func (v *MapCredentialValidator) ValidateCredentials(username, password string) bool
type Options ¶
type Options struct {
Hooks Hooks
RateLimiter *server.RateLimiter
}
Click to show internal directories.
Click to hide internal directories.