Documentation
¶
Index ¶
- Constants
- type CompleteStepRequest
- type Config
- type DenyApprovalRequest
- type Deps
- type FailStepRequest
- type GrantApprovalRequest
- type Kernel
- func (k *Kernel) CancelExecution(ctx context.Context, id uuid.UUID) error
- func (k *Kernel) CancelExpiredExecutions(ctx context.Context, now time.Time) error
- func (k *Kernel) Cleanup(ctx context.Context, retain time.Duration, now time.Time) error
- func (k *Kernel) CompleteExecution(ctx context.Context, execID uuid.UUID, lease domain.Lease, ...) error
- func (k *Kernel) CompleteStep(ctx context.Context, stepID string, req CompleteStepRequest) (domain.StepDecision, error)
- func (k *Kernel) CreateExecution(ctx context.Context, agentID string, input json.RawMessage, ...) (domain.Execution, error)
- func (k *Kernel) DeleteAgent(ctx context.Context, id string) error
- func (k *Kernel) DenyApproval(ctx context.Context, id uuid.UUID, req DenyApprovalRequest) error
- func (k *Kernel) Deps() Deps
- func (k *Kernel) DrainDispatches(ctx context.Context) error
- func (k *Kernel) EnqueueReDrive(ctx context.Context, execID uuid.UUID) error
- func (k *Kernel) ExpireApprovals(ctx context.Context, now time.Time) error
- func (k *Kernel) FailExecution(ctx context.Context, execID uuid.UUID, lease domain.Lease, reason string) error
- func (k *Kernel) FailStep(ctx context.Context, stepID string, req FailStepRequest) (domain.StepDecision, error)
- func (k *Kernel) GetAgent(ctx context.Context, id string) (domain.Agent, error)
- func (k *Kernel) GetApproval(ctx context.Context, id uuid.UUID) (domain.Approval, error)
- func (k *Kernel) GetEvents(ctx context.Context, id uuid.UUID, afterSeq int64, limit int) ([]domain.Event, error)
- func (k *Kernel) GetExecution(ctx context.Context, id uuid.UUID) (domain.Execution, error)
- func (k *Kernel) GetStep(ctx context.Context, stepID string) (domain.Step, error)
- func (k *Kernel) GrantApproval(ctx context.Context, id uuid.UUID, req GrantApprovalRequest) error
- func (k *Kernel) Heartbeat(ctx context.Context, execID uuid.UUID, lease domain.Lease) error
- func (k *Kernel) ListAgents(ctx context.Context) ([]domain.Agent, error)
- func (k *Kernel) ListExecutions(ctx context.Context, filter domain.ExecutionFilter) (domain.ExecutionPage, error)
- func (k *Kernel) ListPendingApprovals(ctx context.Context) ([]domain.Approval, error)
- func (k *Kernel) ListSteps(ctx context.Context, execID uuid.UUID) ([]domain.Step, error)
- func (k *Kernel) LoadPolicyBundle(ctx context.Context, agentID string, bundle string) error
- func (k *Kernel) RegisterAgent(ctx context.Context, agent domain.Agent) error
- func (k *Kernel) RunDispatcher(ctx context.Context) error
- func (k *Kernel) SubmitStep(ctx context.Context, execID uuid.UUID, req SubmitStepRequest) (domain.StepDecision, error)
- func (k *Kernel) TestPolicy(ctx context.Context, agentID string, req PolicyTestRequest) (policy.Report, error)
- type PolicyTestRequest
- type SubmitStepRequest
Constants ¶
View Source
const MaxListExecutionsLimit = 200
MaxListExecutionsLimit caps the page size a caller can request.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompleteStepRequest ¶ added in v0.6.0
type CompleteStepRequest struct {
Result json.RawMessage `json:"result"`
Lease domain.Lease `json:"-"`
}
type Config ¶ added in v0.6.0
type Config struct {
DispatchMaxAttempts int
DispatchBaseDelay time.Duration
DispatchMaxDelay time.Duration
DispatchTimeout time.Duration
DispatchConcurrency int
DispatchLeaseTimeout time.Duration
DefaultApprovalTimeout time.Duration
ExecutionDeadlineTimeout time.Duration
ExecutionCleanupInterval time.Duration
ExecutionRetention time.Duration
LeaderLockKey string
ReplicaID string
}
func DefaultConfig ¶ added in v0.6.0
func DefaultConfig() Config
type DenyApprovalRequest ¶ added in v0.6.0
type Deps ¶
type Deps struct {
Events store.EventStore
Steps store.StepStore
Executions store.ExecutionStore
Agents store.AgentStore
Approvals store.ApprovalStore
Queue store.JobQueue
Locker store.Locker
UnitOfWork store.UnitOfWork
Policy policy.Engine
Dispatcher *dispatcher.Dispatcher
RateLimiter ratelimit.Limiter
Logger *slog.Logger
Observer *observe.Observer
}
type FailStepRequest ¶ added in v0.6.0
type FailStepRequest struct {
Error json.RawMessage `json:"error"`
Lease domain.Lease `json:"-"`
}
type GrantApprovalRequest ¶ added in v0.6.0
type Kernel ¶
type Kernel struct {
// contains filtered or unexported fields
}
func (*Kernel) CancelExecution ¶
func (*Kernel) CancelExpiredExecutions ¶ added in v0.6.0
func (*Kernel) CompleteExecution ¶ added in v0.6.0
func (*Kernel) CompleteStep ¶ added in v0.6.0
func (k *Kernel) CompleteStep(ctx context.Context, stepID string, req CompleteStepRequest) (domain.StepDecision, error)
func (*Kernel) CreateExecution ¶
func (*Kernel) DeleteAgent ¶ added in v0.6.0
func (*Kernel) DenyApproval ¶ added in v0.6.0
func (*Kernel) DrainDispatches ¶ added in v0.18.0
func (*Kernel) EnqueueReDrive ¶ added in v0.6.0
func (*Kernel) ExpireApprovals ¶ added in v0.6.0
func (*Kernel) FailExecution ¶ added in v0.6.0
func (*Kernel) FailStep ¶ added in v0.6.0
func (k *Kernel) FailStep(ctx context.Context, stepID string, req FailStepRequest) (domain.StepDecision, error)
func (*Kernel) GetApproval ¶ added in v0.6.0
func (*Kernel) GetExecution ¶
func (*Kernel) GrantApproval ¶ added in v0.6.0
func (*Kernel) ListAgents ¶ added in v0.6.0
func (*Kernel) ListExecutions ¶
func (k *Kernel) ListExecutions(ctx context.Context, filter domain.ExecutionFilter) (domain.ExecutionPage, error)
func (*Kernel) ListPendingApprovals ¶ added in v0.6.0
func (*Kernel) LoadPolicyBundle ¶ added in v0.6.0
func (*Kernel) RegisterAgent ¶ added in v0.6.0
func (*Kernel) RunDispatcher ¶ added in v0.18.0
RunDispatcher logs store errors and backs off rather than returning them.
func (*Kernel) SubmitStep ¶ added in v0.6.0
func (k *Kernel) SubmitStep(ctx context.Context, execID uuid.UUID, req SubmitStepRequest) (domain.StepDecision, error)
func (*Kernel) TestPolicy ¶ added in v0.19.0
type PolicyTestRequest ¶ added in v0.19.0
type SubmitStepRequest ¶ added in v0.6.0
Click to show internal directories.
Click to hide internal directories.