runconfig

package
v0.0.0-...-c40c2f6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2026 License: Unlicense Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigWarnings

func ConfigWarnings(cfg Config) []string

ConfigWarnings returns advisory messages for potential MCP misconfiguration.

Types

type Config

type Config struct {
	Parallelism int         `toml:"parallelism"`
	Jobs        []JobConfig `toml:"job"`
}

Config represents the contents of ingest.config.toml.

func LoadFile

func LoadFile(path string) (Config, error)

LoadFile loads a configuration from disk.

func Parse

func Parse(data []byte) (Config, error)

Parse decodes configuration data.

type Duration

type Duration struct {
	time.Duration
}

Duration wraps time.Duration to support TOML marshaling.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText parses Go duration strings.

type ExecutionResult

type ExecutionResult struct {
	Job      JobConfig
	Result   jobs.Result
	Err      error
	Duration time.Duration
}

ExecutionResult captures the outcome of a job execution.

func Execute

func Execute(ctx context.Context, out io.Writer, cfg Config) ([]ExecutionResult, error)

Execute runs all jobs with optional parallelism. The returned error aggregates individual job failures while ensuring every job runs.

type JobConfig

type JobConfig struct {
	Name             string        `toml:"name"`
	Type             string        `toml:"type"`
	Path             string        `toml:"path"`
	RespectGitignore *bool         `toml:"respect_gitignore"`
	Command          string        `toml:"command"`
	Owner            string        `toml:"owner"`
	Repo             string        `toml:"repo"`
	MCP              *MCPOverrides `toml:"mcp"`
}

JobConfig describes a single ingestion job.

func (JobConfig) DisplayName

func (job JobConfig) DisplayName() string

DisplayName returns a human-friendly identifier for the job.

type MCPOverrides

type MCPOverrides struct {
	Provider string            `toml:"provider"`
	Endpoint string            `toml:"endpoint"`
	Token    string            `toml:"token"`
	Headers  map[string]string `toml:"headers"`
	Timeout  Duration          `toml:"timeout"`
	Retry    RetryOverrides    `toml:"retry"`
}

MCPOverrides configures MCP-backed jobs.

type RetryOverrides

type RetryOverrides struct {
	MaxAttempts    int      `toml:"max_attempts"`
	InitialBackoff Duration `toml:"initial_backoff"`
	MaxBackoff     Duration `toml:"max_backoff"`
}

RetryOverrides customises retry behaviour for MCP jobs.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL