Documentation
¶
Overview ¶
Package automation exposes the automation workflow primitives for use by external embedders, seshat-ai, and cmd/automation workflows.
Index ¶
- Constants
- type AgentConfig
- type CronSchedule
- type DBJobStore
- type DiscardSink
- type ExecuteConfig
- type ExecuteFunc
- type ExecutionState
- type Executor
- type ExecutorConfig
- type FileSink
- type FileStateStore
- type IntervalSchedule
- type Job
- type JobRun
- type JobScheduler
- type JobStatus
- type JobStore
- type MemoryStateStore
- type Middleware
- type ModelIdentifier
- type MultiSink
- type OnceSchedule
- type Options
- type Registry
- type Result
- type RunStatus
- type Runner
- type RunnerConfig
- type Schedule
- type ScheduledRun
- type Scheduler
- type Sink
- type StateStore
- type StdoutSink
- type SystemPrompter
- type Trigger
- type TriggerType
- type WebhookSink
- type Workflow
Constants ¶
View Source
const ( TriggerTypeCron = automation.TriggerTypeCron TriggerTypeInterval = automation.TriggerTypeInterval TriggerTypeOnce = automation.TriggerTypeOnce JobStatusActive = automation.JobStatusActive JobStatusPaused = automation.JobStatusPaused JobStatusInactive = automation.JobStatusInactive RunStatusRunning = automation.RunStatusRunning RunStatusSuccess = automation.RunStatusSuccess RunStatusError = automation.RunStatusError )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig = automation.AgentConfig
type CronSchedule ¶
type CronSchedule = automation.CronSchedule
func Cron ¶
func Cron(expr string) (*CronSchedule, error)
func MustCron ¶
func MustCron(expr string) *CronSchedule
type DBJobStore ¶
type DBJobStore = automation.DBJobStore
type DiscardSink ¶
type DiscardSink = automation.DiscardSink
type ExecuteConfig ¶
type ExecuteConfig = automation.ExecuteConfig
type ExecuteFunc ¶
type ExecuteFunc = automation.ExecuteFunc
type ExecutionState ¶
type ExecutionState = automation.ExecutionState
type Executor ¶
type Executor = automation.Executor
func NewExecutor ¶
func NewExecutor(cfg ExecutorConfig) (*Executor, error)
type ExecutorConfig ¶
type ExecutorConfig = automation.ExecutorConfig
type FileSink ¶
type FileSink = automation.FileSink
type FileStateStore ¶
type FileStateStore = automation.FileStateStore
func NewFileStateStore ¶
func NewFileStateStore(dir string) (*FileStateStore, error)
type IntervalSchedule ¶
type IntervalSchedule = automation.IntervalSchedule
func Every ¶
func Every(d time.Duration) *IntervalSchedule
type Job ¶
type Job = automation.Job
type JobRun ¶
type JobRun = automation.JobRun
type JobScheduler ¶
type JobScheduler = automation.JobScheduler
func NewJobScheduler ¶
func NewJobScheduler(store JobStore, runner *Runner) *JobScheduler
NewJobScheduler builds a JobScheduler backed by store and runner. To create a DBJobStore, use internal/automation.NewDBJobStore with a *db.DB.
type JobStatus ¶
type JobStatus = automation.JobStatus
type JobStore ¶
type JobStore = automation.JobStore
type MemoryStateStore ¶
type MemoryStateStore = automation.MemoryStateStore
func NewMemoryStateStore ¶
func NewMemoryStateStore() *MemoryStateStore
type Middleware ¶
type Middleware = automation.Middleware
func Chain ¶
func Chain(mw ...Middleware) Middleware
func WithLogging ¶
func WithLogging(l *log.Logger) Middleware
func WithMetrics ¶
func WithMetrics(fn func(Result)) Middleware
func WithRecovery ¶
func WithRecovery() Middleware
func WithTimeout ¶
func WithTimeout(d time.Duration) Middleware
type ModelIdentifier ¶
type ModelIdentifier = sdk.ModelIdentifier
type OnceSchedule ¶
type OnceSchedule = automation.OnceSchedule
func Once ¶
func Once(at time.Time) *OnceSchedule
type Options ¶
type Options = automation.Options
func DefaultOptions ¶
func DefaultOptions() Options
type Result ¶
type Result = automation.Result
type RunStatus ¶
type RunStatus = automation.RunStatus
type Runner ¶
type Runner = automation.Runner
func NewRunner ¶
func NewRunner(cfg RunnerConfig) (*Runner, error)
type RunnerConfig ¶
type RunnerConfig = automation.RunnerConfig
func RunnerConfigFromEnv ¶
func RunnerConfigFromEnv(modelRaw string) (RunnerConfig, error)
RunnerConfigFromEnv resolves provider credentials from the environment and seshat config file. modelRaw follows "provider:model" format.
type Schedule ¶
type Schedule = automation.Schedule
type ScheduledRun ¶
type ScheduledRun = automation.ScheduledRun
type Sink ¶
type Sink = automation.Sink
type StateStore ¶
type StateStore = automation.StateStore
type StdoutSink ¶
type StdoutSink = automation.StdoutSink
type SystemPrompter ¶
type SystemPrompter = automation.SystemPrompter
type Trigger ¶
type Trigger = automation.Trigger
type TriggerType ¶
type TriggerType = automation.TriggerType
type WebhookSink ¶
type WebhookSink = automation.WebhookSink
func NewWebhookSink ¶
func NewWebhookSink(url string) *WebhookSink
type Workflow ¶
type Workflow = automation.Workflow
Click to show internal directories.
Click to hide internal directories.