Documentation
¶
Index ¶
Constants ¶
const (
// RateLimitWaitSeconds is how long to wait when rate limited (61 minutes)
RateLimitWaitSeconds = 3660
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config represents the configuration for the exec command. All values are loaded from environment variables.
func LoadConfig ¶
LoadConfig loads configuration from environment variables using viper.
type LogSinkFactory ¶
LogSinkFactory creates an optional io.Writer for streaming logs to a remote store. Returns (nil, nil) if not applicable. The cleanup function should be called when the writer is no longer needed.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner executes the main iteration loop.
type RunnerOption ¶
type RunnerOption func(*Runner)
RunnerOption configures optional Runner behavior.
func WithLogSinkFactory ¶
func WithLogSinkFactory(f LogSinkFactory) RunnerOption
WithLogSinkFactory sets a factory for creating a remote log sink.
func WithStateSyncFactory ¶
func WithStateSyncFactory(f StateSyncFactory) RunnerOption
WithStateSyncFactory sets a factory for creating a remote state sync function.
type State ¶
type State struct {
Branch string `json:"branch"`
Iteration int `json:"iteration"`
Status status `json:"status"`
LastUpdated time.Time `json:"last_updated"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
CPUPercent float64 `json:"cpu_percent,omitempty"`
MemoryPercent float64 `json:"memory_percent,omitempty"`
}
State represents the persistent state of the execution loop.
type StateSyncFactory ¶
type StateSyncFactory func(ctx context.Context) StateSyncFunc
StateSyncFactory creates an optional function for syncing state to a remote store. Returns nil if not applicable.
type StateSyncFunc ¶
type StateSyncFunc func(statePath string)
StateSyncFunc is called after each local state save to sync state to a remote store (e.g., GCS). It receives the path to the local state file. Errors are logged as warnings but do not fail the loop.