flightsqlingress

package
v0.0.0-...-a19b83b Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReapTriggerPeriodic = "periodic"
	ReapTriggerForced   = "forced"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SessionIdleTTL     time.Duration
	SessionReapTick    time.Duration
	HandleIdleTTL      time.Duration
	SessionTokenTTL    time.Duration
	WorkerQueueTimeout time.Duration // applied to CreateSession calls; 0 = use request context as-is
}

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, users map[string]string) (*ControlPlaneFlightSQLHandler, error)

func (*ControlPlaneFlightSQLHandler) BeginTransaction

func (*ControlPlaneFlightSQLHandler) ClosePreparedStatement

func (*ControlPlaneFlightSQLHandler) CloseSession

func (*ControlPlaneFlightSQLHandler) DoGetDBSchemas

func (*ControlPlaneFlightSQLHandler) DoGetPreparedStatement

func (*ControlPlaneFlightSQLHandler) DoGetStatement

func (*ControlPlaneFlightSQLHandler) DoGetTables

func (*ControlPlaneFlightSQLHandler) DoPutCommandStatementUpdate

func (h *ControlPlaneFlightSQLHandler) DoPutCommandStatementUpdate(ctx context.Context, cmd flightsql.StatementUpdate) (int64, error)

func (*ControlPlaneFlightSQLHandler) EndTransaction

func (*ControlPlaneFlightSQLHandler) GetFlightInfoPreparedStatement

func (*ControlPlaneFlightSQLHandler) GetFlightInfoSchemas

func (*ControlPlaneFlightSQLHandler) GetFlightInfoStatement

func (*ControlPlaneFlightSQLHandler) GetFlightInfoTables

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, users map[string]string, provider SessionProvider, cfg Config, opts Options) (*FlightIngress, error)

func (*FlightIngress) Addr

func (fi *FlightIngress) Addr() string

Addr returns the bound listener address.

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.

type Hooks

type Hooks struct {
	OnSessionCountChanged func(int)
	OnSessionsReaped      func(trigger string, count int)
}

type Options

type Options struct {
	Hooks       Hooks
	RateLimiter *server.RateLimiter
}

type SessionProvider

type SessionProvider interface {
	CreateSession(ctx context.Context, username string, pid int32, memoryLimit string, threads int) (int32, *server.FlightExecutor, error)
	DestroySession(int32)
}

Jump to

Keyboard shortcuts

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