Documentation
¶
Index ¶
- func Start(ctx context.Context, deps bootstrap.RuntimeDependencies) (bootstrap.Runtime, error)
- type ActiveExecutionRegistry
- type OpenSQLiteCoordinatorFunc
- type Options
- type ReadProcessCommandFunc
- type RecoveryOrphanAgentCleanup
- type RecoverySummary
- type RunSchedulerTickFunc
- type Runtime
- func (r *Runtime) CompleteStartup(ctx context.Context) error
- func (r *Runtime) Config() config.Config
- func (r *Runtime) ExecutionMatchesProcess(ctx context.Context, execution storage.AgentExecutionRecord, pid int) (matches bool, running bool, err error)
- func (r *Runtime) NetworkStatus() networkclient.Status
- func (r *Runtime) ReconcileStaleRunningRuns(ctx context.Context) (StaleRunReconcileSummary, error)
- func (r *Runtime) ReconcileWebhookForwarders()
- func (r *Runtime) RecordWebhookDelivery(eventType, deliveryID string)
- func (r *Runtime) RecoverySummary() RecoverySummary
- func (r *Runtime) RefreshWebhookForwarders() error
- func (r *Runtime) Services() Services
- func (r *Runtime) Start(ctx context.Context) error
- func (r *Runtime) StartedAt() (time.Time, bool)
- func (r *Runtime) Stop(reason string)
- func (r *Runtime) TriggerSchedulerClaim()
- func (r *Runtime) TriggerSchedulerTick()
- func (r *Runtime) WaitForShutdown()
- func (r *Runtime) WebhookForwarder() WebhookForwarder
- func (r *Runtime) WebhookStatus() WebhookStatus
- func (r *Runtime) WorktreeCleanupStatus() WorktreeCleanupStatus
- type Services
- type SignalProcessFunc
- type StaleRunReconcileSummary
- type SyncConfiguredProjectsFunc
- type WebhookCounters
- type WebhookForwarder
- type WebhookForwarderState
- type WebhookForwarderStatus
- type WebhookQueueStatus
- type WebhookRecentOutcome
- type WebhookRuntimeStatus
- type WebhookStatus
- type WebhookTunnelState
- type WorktreeCleanupStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActiveExecutionRegistry ¶
type ActiveExecutionRegistry struct {
// contains filtered or unexported fields
}
func NewActiveExecutionRegistry ¶
func NewActiveExecutionRegistry() *ActiveExecutionRegistry
func (*ActiveExecutionRegistry) Kill ¶
func (r *ActiveExecutionRegistry) Kill(loopID, runID, executionID, reason string) (bool, error)
func (*ActiveExecutionRegistry) Register ¶
func (r *ActiveExecutionRegistry) Register(loopID, runID, executionID string, execution activeExecution) func()
type OpenSQLiteCoordinatorFunc ¶
type OpenSQLiteCoordinatorFunc func(context.Context, string, storage.SQLiteCoordinatorOptions) (*storage.SQLiteCoordinator, error)
type Options ¶
type Options struct {
Config config.Config
Logger bootstrap.Logger
Now func() time.Time
ShutdownTimeout time.Duration
WorktreeCleanupInitialDelay time.Duration
OpenSQLiteCoordinator OpenSQLiteCoordinatorFunc
SyncConfiguredProjects SyncConfiguredProjectsFunc
RunSchedulerTick RunSchedulerTickFunc
ReadProcessCommand ReadProcessCommandFunc
SignalProcess SignalProcessFunc
DeferRecovery bool
}
type ReadProcessCommandFunc ¶
type RecoverySummary ¶
type RecoverySummary struct {
StartedAt string `json:"startedAt,omitempty"`
CompletedAt string `json:"completedAt,omitempty"`
OrphanAgentCleanup RecoveryOrphanAgentCleanup `json:"orphanAgentCleanup"`
ExpiredLocksReleased int64 `json:"expiredLocksReleased"`
InterruptedRunsMarked int64 `json:"interruptedRunsMarked"`
LoopsRequeued int64 `json:"loopsRequeued"`
EventsWritten int64 `json:"eventsWritten"`
}
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
func (*Runtime) CompleteStartup ¶ added in v0.7.1
func (*Runtime) ExecutionMatchesProcess ¶
func (*Runtime) NetworkStatus ¶ added in v0.9.0
func (r *Runtime) NetworkStatus() networkclient.Status
func (*Runtime) ReconcileStaleRunningRuns ¶ added in v0.9.1
func (r *Runtime) ReconcileStaleRunningRuns(ctx context.Context) (StaleRunReconcileSummary, error)
func (*Runtime) ReconcileWebhookForwarders ¶ added in v0.8.0
func (r *Runtime) ReconcileWebhookForwarders()
func (*Runtime) RecordWebhookDelivery ¶ added in v0.8.0
func (*Runtime) RecoverySummary ¶
func (r *Runtime) RecoverySummary() RecoverySummary
func (*Runtime) RefreshWebhookForwarders ¶ added in v0.8.0
func (*Runtime) TriggerSchedulerClaim ¶ added in v0.8.0
func (r *Runtime) TriggerSchedulerClaim()
func (*Runtime) TriggerSchedulerTick ¶
func (r *Runtime) TriggerSchedulerTick()
func (*Runtime) WaitForShutdown ¶
func (r *Runtime) WaitForShutdown()
func (*Runtime) WebhookForwarder ¶ added in v0.8.0
func (r *Runtime) WebhookForwarder() WebhookForwarder
func (*Runtime) WebhookStatus ¶ added in v0.8.0
func (r *Runtime) WebhookStatus() WebhookStatus
func (*Runtime) WorktreeCleanupStatus ¶ added in v0.9.0
func (r *Runtime) WorktreeCleanupStatus() WorktreeCleanupStatus
type Services ¶
type Services struct {
Coordinator *storage.SQLiteCoordinator
Repositories *storage.Repositories
Projects *projects.Service
Loops *loops.Service
Runs *runs.Service
ActiveExecutions *ActiveExecutionRegistry
}
type StaleRunReconcileSummary ¶ added in v0.9.1
type StaleRunReconcileSummary struct {
Mode string `json:"mode"`
StartedAt string `json:"startedAt,omitempty"`
CompletedAt string `json:"completedAt,omitempty"`
CandidateRuns int64 `json:"candidateRuns"`
InterruptedRuns int64 `json:"interruptedRuns"`
LoopsRequeued int64 `json:"loopsRequeued"`
QueueItemsRequeued int64 `json:"queueItemsRequeued"`
QueueItemsCancelled int64 `json:"queueItemsCancelled"`
CleanedExecutions int64 `json:"cleanedExecutions"`
SkippedUncertainRuns int64 `json:"skippedUncertainRuns"`
EventsWritten int64 `json:"eventsWritten"`
RunIDs []string `json:"runIds,omitempty"`
LoopIDs []string `json:"loopIds,omitempty"`
ExecutionIDs []string `json:"executionIds,omitempty"`
}
type WebhookCounters ¶ added in v0.8.0
type WebhookForwarder ¶ added in v0.8.0
type WebhookForwarder interface {
Forward(context.Context, webhookforward.DeliveryRequest) (webhookforward.ForwardResult, error)
Stats() webhookforward.Stats
Close()
}
type WebhookForwarderState ¶ added in v0.8.0
type WebhookForwarderState struct {
Repo string `json:"repo"`
Running bool `json:"running"`
PID *int `json:"pid,omitempty"`
Adopted bool `json:"adopted"`
Latched bool `json:"latched"`
LatchReason *string `json:"latchReason,omitempty"`
Fingerprint string `json:"fingerprint,omitempty"`
SpawnedAt *string `json:"spawnedAt,omitempty"`
Command []string `json:"command"`
RestartCount int `json:"restartCount"`
LastStartedAt *string `json:"lastStartedAt,omitempty"`
LastExitAt *string `json:"lastExitAt,omitempty"`
LastError string `json:"lastError,omitempty"`
StdoutTail []string `json:"stdoutTail,omitempty"`
StderrTail []string `json:"stderrTail,omitempty"`
}
type WebhookForwarderStatus ¶ added in v0.8.0
type WebhookForwarderStatus struct {
Repo string `json:"repo"`
Events []string `json:"events"`
Command []string `json:"command"`
Running bool `json:"running"`
RespawnCount int `json:"respawnCount"`
LastStartAt *string `json:"lastStartAt,omitempty"`
LastExitAt *string `json:"lastExitAt,omitempty"`
LastError *string `json:"lastError,omitempty"`
Tail []string `json:"tail"`
}
type WebhookQueueStatus ¶ added in v0.8.0
type WebhookRecentOutcome ¶ added in v0.8.0
type WebhookRuntimeStatus ¶ added in v0.8.0
type WebhookStatus ¶ added in v0.8.0
type WebhookStatus struct {
Enabled bool `json:"enabled"`
Mode config.WebhookMode `json:"mode"`
ConfiguredTunnelProjectIDs []string `json:"configuredTunnelProjectIds,omitempty"`
FallbackPollIntervalSeconds int `json:"fallbackPollIntervalSeconds"`
ListenerPath string `json:"listenerPath"`
EndpointURL string `json:"endpointUrl"`
TunnelListenerURL string `json:"tunnelListenerUrl,omitempty"`
TunnelPublicBaseURL string `json:"tunnelPublicBaseUrl,omitempty"`
Degraded bool `json:"degraded"`
DegradedReasons []string `json:"degradedReasons"`
Queue WebhookQueueStatus `json:"queue"`
Counters WebhookCounters `json:"counters"`
RecentOutcomes []WebhookRecentOutcome `json:"recentOutcomes"`
Forwarders []WebhookForwarderState `json:"forwarders"`
TunnelHooks []WebhookTunnelState `json:"tunnelHooks"`
}
type WebhookTunnelState ¶ added in v0.8.1
type WebhookTunnelState struct {
Repo string `json:"repo"`
HookID *int64 `json:"hookId,omitempty"`
ManagedURL string `json:"managedUrl,omitempty"`
LastPingAt *string `json:"lastPingAt,omitempty"`
ConsecutiveDisables int64 `json:"consecutiveDisables"`
Latched bool `json:"latched"`
Orphaned bool `json:"orphaned"`
LastError string `json:"lastError,omitempty"`
}
type WorktreeCleanupStatus ¶ added in v0.9.0
type WorktreeCleanupStatus struct {
Enabled bool `json:"enabled"`
DryRun bool `json:"dryRun"`
LastStartedAt *string `json:"lastStartedAt,omitempty"`
LastCompletedAt *string `json:"lastCompletedAt,omitempty"`
LastStatus string `json:"lastStatus"`
Scanned int `json:"scanned"`
Candidates int `json:"candidates"`
Cleaned int `json:"cleaned"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
LastError string `json:"lastError,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.