Documentation
¶
Index ¶
Constants ¶
const ( Delimiter = "<IDS|MSG>" ProtocolVersion = "5.4" )
const (
KernelVersion = "0.1.0"
)
Variables ¶
This section is empty.
Functions ¶
func VerifySignature ¶
VerifySignature checks the HMAC signature of incoming message frames.
Types ¶
type ArrowServer ¶ added in v0.1.1
type ArrowServer struct {
// contains filtered or unexported fields
}
ArrowServer serves Arrow IPC files over HTTP directly from the spool. Also serves static assets (perspective JS/WASM) for VS Code renderer. Exposes /introspect endpoint for database metadata exploration.
func NewArrowServer ¶ added in v0.1.1
func NewArrowServer(sp *spool.Spool, introspector *engine.Introspector) (*ArrowServer, error)
NewArrowServer creates and starts an HTTP server on a random port.
func (*ArrowServer) ArrowURL ¶ added in v0.1.1
func (as *ArrowServer) ArrowURL(queryID string, totalRows int64) string
ArrowURL returns the URL for fetching the given query's Arrow data. Uses streaming endpoint for large datasets, raw file for small ones.
func (*ArrowServer) BaseURL ¶ added in v0.1.1
func (as *ArrowServer) BaseURL() string
BaseURL returns the base URL of the Arrow HTTP server.
func (*ArrowServer) Close ¶ added in v0.1.1
func (as *ArrowServer) Close() error
Close shuts down the HTTP server.
func (*ArrowServer) Port ¶ added in v0.1.1
func (as *ArrowServer) Port() int
Port returns the port the server is listening on.
type ConnectionInfo ¶
type ConnectionInfo struct {
Transport string `json:"transport"`
IP string `json:"ip"`
ShellPort int `json:"shell_port"`
ControlPort int `json:"control_port"`
IOPubPort int `json:"iopub_port"`
StdinPort int `json:"stdin_port"`
HBPort int `json:"hb_port"`
Key string `json:"key"`
SignatureScheme string `json:"signature_scheme"`
}
ConnectionInfo holds the parsed Jupyter connection file data.
func (*ConnectionInfo) Endpoint ¶
func (c *ConnectionInfo) Endpoint(port int) string
Endpoint returns the ZMQ endpoint string for a given port.
type Header ¶
type Header struct {
MsgID string `json:"msg_id"`
Session string `json:"session"`
Username string `json:"username"`
Date string `json:"date"`
MsgType string `json:"msg_type"`
Version string `json:"version"`
}
Header represents a Jupyter message header.
type History ¶ added in v0.2.0
type History struct {
// contains filtered or unexported fields
}
History stores recent executed queries and persists them to a temp file.
func NewHistory ¶ added in v0.2.0
NewHistory creates a history backed by a file in the given directory.
type HistoryEntry ¶ added in v0.2.0
type HistoryEntry struct {
Session int `json:"session"`
Line int `json:"line"`
Source string `json:"source"`
}
HistoryEntry represents a single executed query in the history.
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
Kernel manages the Jupyter kernel lifecycle and ZMQ sockets.
func (*Kernel) SetTileSources ¶ added in v0.2.0
func (k *Kernel) SetTileSources(sources []TileSourceConfig)
SetTileSources configures basemap tile sources for the map plugin.
type Message ¶
type Message struct {
Identities [][]byte
Header Header
ParentHeader Header
Metadata map[string]any
Content map[string]any
}
Message represents a complete Jupyter wire protocol message.
func Deserialize ¶
Deserialize parses wire format frames into a Message.
func NewMessage ¶
NewMessage creates a new message as a reply to the given parent.
type TileSourceConfig ¶ added in v0.2.0
type TileSourceConfig struct {
Name string `json:"name"`
URL string `json:"url"`
Type string `json:"type"` // "raster", "vector", "tilejson"
Attribution string `json:"attribution,omitempty"`
MinZoom int `json:"min_zoom,omitempty"`
MaxZoom int `json:"max_zoom,omitempty"`
}
TileSourceConfig holds a basemap tile source configuration.