flight_server

package
v0.0.0-...-d589dc2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package flight_server provides a Flight server for handling Arrow record batches.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlightServer

type FlightServer struct {
	flight.BaseFlightServer
	// contains filtered or unexported fields
}

FlightServer implements a simple Arrow Flight server for sharing Arrow RecordBatches between services with minimal serialization.

func NewFlightServer

func NewFlightServer(config ServerConfig) (*FlightServer, error)

NewFlightServer creates a new Arrow Flight server

func (*FlightServer) DeleteBatch

func (s *FlightServer) DeleteBatch(batchID string) bool

DeleteBatch deletes a batch from the server

func (*FlightServer) DoGet

func (s *FlightServer) DoGet(request *flight.Ticket, stream flight.FlightService_DoGetServer) error

DoGet implements the Flight DoGet method

func (*FlightServer) DoPut

DoPut implements the Flight DoPut method

func (*FlightServer) GetFlightInfo

func (s *FlightServer) GetFlightInfo(ctx context.Context, request *flight.FlightDescriptor) (*flight.FlightInfo, error)

GetFlightInfo implements the Flight GetFlightInfo method

func (*FlightServer) HasBatch

func (s *FlightServer) HasBatch(batchID string) bool

HasBatch checks if a batch exists in the server

func (*FlightServer) ListBatches

func (s *FlightServer) ListBatches() []string

ListBatches returns the IDs of all stored batches

func (*FlightServer) Start

func (s *FlightServer) Start() error

Start starts the Flight server

func (*FlightServer) Stop

func (s *FlightServer) Stop()

Stop stops the Flight server

func (*FlightServer) UpdateBatchTTL

func (s *FlightServer) UpdateBatchTTL(batchID string, ttl time.Duration) bool

UpdateBatchTTL updates the expiration time for a batch

type ServerConfig

type ServerConfig struct {
	// Address to listen on (e.g., "localhost:8080")
	Addr string
	// Memory allocator to use
	Allocator memory.Allocator
	// TTL for stored batches (default: 1 hour)
	TTL time.Duration
}

ServerConfig contains configuration options for the Flight server

Jump to

Keyboard shortcuts

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