Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentdExecutor ¶
type AgentdExecutor interface {
Execute(ctx context.Context, podIP string, req *NodeExecRequest) (*NodeExecResponse, error)
}
type AppEngineLogger ¶
type AppEngineLogger struct {
LogFn func(msg string, kv ...any)
ErrFn func(err error, msg string, kv ...any)
}
AppEngineLogger adapts an external logger to the engine's Logger interface. The concrete type is created by the caller (app.go) — this struct is just a type definition that the caller wraps around its own logger.
func (*AppEngineLogger) Info ¶
func (l *AppEngineLogger) Info(msg string, kv ...any)
type HTTPAgentExecutor ¶
HTTPAgentExecutor calls agentd on the workspace pod via HTTP. Uses context for cancellation and timeout propagation.
func (*HTTPAgentExecutor) Execute ¶
func (e *HTTPAgentExecutor) Execute(ctx context.Context, podIP string, req *NodeExecRequest) (*NodeExecResponse, error)
type K8sWorkspaceActivator ¶
type K8sWorkspaceActivator struct {
K8sClient pkgk8s.KubernetesClient
Namespace string
}
func (*K8sWorkspaceActivator) EnsureActive ¶
type NodeExecRequest ¶
type NodeExecRequest struct {
NodeID string `json:"nodeId"`
NodeType string `json:"nodeType"`
Spec json.RawMessage `json:"spec"`
Input json.RawMessage `json:"input"`
Timeout string `json:"timeout,omitempty"`
}
type NodeExecResponse ¶
type NodeExecResponse struct {
Output json.RawMessage `json:"output,omitempty"`
Branch string `json:"branch,omitempty"`
ErrorCode string `json:"errorCode,omitempty"`
Detail string `json:"detail,omitempty"`
}
type Reconciler ¶
type Reconciler struct {
Store ReconcilerStore
AgentdClient AgentdExecutor
Activator WorkspaceActivator
Logger Logger
MaxConcurrent int
TickInterval time.Duration
// contains filtered or unexported fields
}
func (*Reconciler) Cancel ¶
func (r *Reconciler) Cancel(runID string)
type ReconcilerStore ¶
type ReconcilerStore interface {
ClaimQueuedRuns(ctx context.Context, limit int) ([]*wf.WorkflowRunRow, error)
UpdateWorkflowRunStatus(ctx context.Context, runID, status string, errorCode *string, errMsg json.RawMessage, output json.RawMessage) error
CreateNodeRun(ctx context.Context, row *wf.WorkflowNodeRunRow) error
UpdateNodeRunStatus(ctx context.Context, nodeRunID, status string, output json.RawMessage, branch *string, errorCode *string, errMsg json.RawMessage) error
IncrementTriggerFailures(ctx context.Context, triggerID string) (int, error)
ResetTriggerFailures(ctx context.Context, triggerID string) error
}
type Scheduler ¶
type Scheduler struct {
Store SchedulerStore
Logger Logger
TickInterval time.Duration
}
type SchedulerStore ¶
type SchedulerStore interface {
ListDueCronTriggers(ctx context.Context, now time.Time, limit int) ([]*wf.TriggerRow, error)
GetWorkflow(ctx context.Context, ownerType, ownerID, workflowID string) (*wf.WorkflowRow, error)
CreateWorkflowRunWithFire(ctx context.Context, fire *wf.TriggerFireRow, run *wf.WorkflowRunRow) error
CreateTriggerFire(ctx context.Context, row *wf.TriggerFireRow) error
UpdateTriggerFireTimestamps(ctx context.Context, triggerID string, lastFiredAt time.Time, nextFireAt *time.Time) error
IncrementTriggerFailures(ctx context.Context, triggerID string) (int, error)
DisableTrigger(ctx context.Context, triggerID string) error
}
Click to show internal directories.
Click to hide internal directories.