Documentation
¶
Index ¶
- func AvailableRuntimeNames() []string
- func InstancesFromMD(ctx context.Context, mdContainers []*md.Container) []runtime.Instance
- func New(ctx context.Context, log *slog.Logger, ...) (*md.Client, error)
- type Backend
- func (b *Backend) Connect(ctx context.Context, id runtime.ID, opts *runtime.StartOptions) (runtime.ConnectionInfo, error)
- func (b *Backend) Diff(ctx context.Context, id runtime.ID, repoIdx int, args ...string) (string, error)
- func (b *Backend) Fetch(ctx context.Context, id runtime.ID) error
- func (b *Backend) Fork(ctx context.Context, id runtime.ID, opts *runtime.ForkOptions) (runtime.ID, runtime.ConnectionInfo, []runtime.Repo, error)
- func (b *Backend) Inspect(ctx context.Context, id runtime.ID) (*runtime.InstanceInspect, error)
- func (b *Backend) Launch(ctx context.Context, repos []runtime.Repo, opts *runtime.StartOptions) (runtime.ID, error)
- func (b *Backend) List(ctx context.Context) ([]runtime.Instance, error)
- func (b *Backend) Metadata(ctx context.Context, id runtime.ID, key runtime.MetadataKey) (string, error)
- func (b *Backend) Name() runtime.Name
- func (b *Backend) Processes(ctx context.Context, id runtime.ID) ([]runtime.ProcessInfo, error)
- func (b *Backend) Purge(ctx context.Context, id runtime.ID) error
- func (b *Backend) Revive(ctx context.Context, id runtime.ID) error
- func (b *Backend) Signal(ctx context.Context, id runtime.ID, pid int, sig string) error
- func (b *Backend) Stop(ctx context.Context, id runtime.ID) error
- func (b *Backend) SudoPassword(ctx context.Context, id runtime.ID) (string, error)
- func (b *Backend) VNCPort(ctx context.Context, id runtime.ID) int
- func (b *Backend) WatchEvents(ctx context.Context, filter runtime.EventFilter) (<-chan runtime.Event, error)
- func (b *Backend) WatchStats(ctx context.Context, ids []runtime.ID) (iter.Seq2[runtime.StatsSample, error], error)
- type SlogWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableRuntimeNames ¶ added in v0.11.0
func AvailableRuntimeNames() []string
AvailableRuntimeNames returns installed container runtime names in preference order.
func InstancesFromMD ¶
InstancesFromMD converts md container handles to runtime-neutral instances.
Types ¶
type Backend ¶
type Backend struct {
Provider genai.Provider // nil if LLM not configured
HarnessEnv map[string][]string // per-harness KEY=VALUE env vars from config
// contains filtered or unexported fields
}
Backend adapts *md.Client to runtime.Lifecycle.
func NewBackend ¶
NewBackend creates a Backend wrapping the given md client.
func (*Backend) Connect ¶
func (b *Backend) Connect(ctx context.Context, id runtime.ID, opts *runtime.StartOptions) (runtime.ConnectionInfo, error)
Connect implements runtime.Lifecycle.
func (*Backend) Diff ¶
func (b *Backend) Diff(ctx context.Context, id runtime.ID, repoIdx int, args ...string) (string, error)
Diff implements runtime.Lifecycle.
func (*Backend) Fork ¶
func (b *Backend) Fork(ctx context.Context, id runtime.ID, opts *runtime.ForkOptions) (runtime.ID, runtime.ConnectionInfo, []runtime.Repo, error)
Fork implements runtime.Lifecycle.
func (*Backend) Inspect ¶ added in v0.11.0
Inspect returns observed runtime configuration for a runtime instance.
func (*Backend) Launch ¶
func (b *Backend) Launch(ctx context.Context, repos []runtime.Repo, opts *runtime.StartOptions) (runtime.ID, error)
Launch implements runtime.Lifecycle.
func (*Backend) Metadata ¶ added in v0.11.0
func (b *Backend) Metadata(ctx context.Context, id runtime.ID, key runtime.MetadataKey) (string, error)
Metadata reads a single runtime instance metadata value, returning "" when unset.
func (*Backend) SudoPassword ¶ added in v0.11.0
SudoPassword fetches the sudo password for a runtime instance over SSH.
func (*Backend) WatchEvents ¶ added in v0.11.0
func (b *Backend) WatchEvents(ctx context.Context, filter runtime.EventFilter) (<-chan runtime.Event, error)
WatchEvents streams lifecycle events for instances matching filter.
type SlogWriter ¶
type SlogWriter struct {
Context context.Context
Logger *slog.Logger
// Phase labels the log entries (e.g. "launch", "warmup").
Phase string
// contains filtered or unexported fields
}
SlogWriter is an io.Writer that logs each complete line via slog.Repository. Use it instead of io.Discard so md output is captured in structured logs.