Documentation
¶
Index ¶
- type Executor
- func (e *Executor) ExecuteQuery(ctx context.Context, pod *WarmPod, sql string, timeout time.Duration) (string, error)
- func (e *Executor) ExecuteScript(ctx context.Context, pod *WarmPod, scriptPath string, timeout time.Duration) (string, error)
- func (e *Executor) HealthCheck(ctx context.Context, pod *WarmPod) error
- func (e *Executor) StreamQuery(ctx context.Context, pod *WarmPod, sql string, writer io.Writer) error
- func (e *Executor) UploadScript(ctx context.Context, pod *WarmPod, scriptContent string, scriptPath string) error
- type Manager
- func (m *Manager) GetMaxQueryDuration() time.Duration
- func (m *Manager) GetMaxRetries() int
- func (m *Manager) GetPoolStatus() ducklakev1alpha1.DuckLakePoolStatus
- func (m *Manager) ReleasePod(ctx context.Context, podName string) error
- func (m *Manager) RequestPod(ctx context.Context, catalog string, resources corev1.ResourceRequirements, ...) (*WarmPod, error)
- func (m *Manager) Shutdown(ctx context.Context) error
- func (m *Manager) Start(ctx context.Context) error
- type QueryResult
- type Request
- type Response
- type WarmPod
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor executes SQL queries on warm pods
func NewExecutor ¶
func NewExecutor(k8sClient kubernetes.Interface, config *rest.Config, logger *zerolog.Logger) *Executor
NewExecutor creates a new executor
func (*Executor) ExecuteQuery ¶
func (e *Executor) ExecuteQuery(ctx context.Context, pod *WarmPod, sql string, timeout time.Duration) (string, error)
ExecuteQuery executes a SQL query on a warm pod
func (*Executor) ExecuteScript ¶
func (e *Executor) ExecuteScript(ctx context.Context, pod *WarmPod, scriptPath string, timeout time.Duration) (string, error)
ExecuteScript executes a SQL script file on a warm pod
func (*Executor) HealthCheck ¶
HealthCheck performs a health check on a warm pod
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages a pool of warm DuckDB pods
func NewManager ¶
func NewManager( client client.Client, k8sClient kubernetes.Interface, scheme *runtime.Scheme, pool *ducklakev1alpha1.DuckLakePool, namespace string, config *rest.Config, recorder record.EventRecorder, ) *Manager
NewManager creates a new pool manager
func (*Manager) GetMaxQueryDuration ¶
GetMaxQueryDuration returns the configured maximum query duration
func (*Manager) GetMaxRetries ¶
GetMaxRetries returns the configured retry count
func (*Manager) GetPoolStatus ¶
func (m *Manager) GetPoolStatus() ducklakev1alpha1.DuckLakePoolStatus
GetPoolStatus returns the current pool status
func (*Manager) ReleasePod ¶
ReleasePod releases a pod back to the pool
func (*Manager) RequestPod ¶
func (m *Manager) RequestPod(ctx context.Context, catalog string, resources corev1.ResourceRequirements, timeout time.Duration) (*WarmPod, error)
RequestPod requests a warm pod from the pool
type QueryResult ¶
QueryResult represents the result of a query execution
type Request ¶
type Request struct {
ID string
Catalog string
Resources corev1.ResourceRequirements
Timeout time.Duration
Response chan Response
}
Request represents a request for a warm pod
type WarmPod ¶
type WarmPod struct {
Name string
Namespace string
PoolName string
State ducklakev1alpha1.PodState
LastUsed time.Time
QueryCount int32
CreatedAt time.Time
// contains filtered or unexported fields
}
WarmPod represents a warm DuckDB pod