runnerlifecycle

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package runnerlifecycle adapts pkg/serverlifecycle to the runner daemon: how an executor on the runner's host observes the runner process.

Index

Constants

View Source
const DefaultProbeTimeout = 5 * time.Second
View Source
const ServerInfoService = "dev.miren.runtime/server-info"

ServerInfoService is where a runner reports its process identity. Same name as the server's, since it describes whichever process answers. Mirrors components/distributedrunner.ServerInfoService; that package is linux-only.

View Source
const Service = "dev.miren.runtime/runner-lifecycle"

Service is the runner's lifecycle ledger over RPC. Mirrors components/distributedrunner.RunnerLifecycleService.

Variables

View Source
var ErrNoListenAddress = errors.New("runner config has no listen address; the runner must start once on a build that records it")

ErrNoListenAddress: the runner config does not say where the runner listens, so there is nothing to probe. A runner records it on start; one that has not predates lifecycle support.

Functions

func ClientState

func ClientState(ctx context.Context, cfg *runnerconfig.Config, address string, log *slog.Logger) (*rpc.State, error)

ClientState dials address with the runner's cluster credentials. The runner's certificate is signed by the cluster CA, which is what its own listener and the coordinator both verify against.

func CoordinatorVersion

func CoordinatorVersion(ctx context.Context, cfg *runnerconfig.Config, log *slog.Logger) (string, error)

CoordinatorVersion asks the runner's coordinator which build it runs, so a runner upgraded from its own host lands on the same one.

func LocalAddress

func LocalAddress(listen string) string

LocalAddress makes a listen address dialable from the runner's own host: a wildcard host ("0.0.0.0", "::", or none) becomes loopback, which the runner's certificate covers. Anything else is already a real address.

Types

type Prober

type Prober struct {
	ConfigPath string
	Log        *slog.Logger
	// Timeout bounds one probe. Zero means DefaultProbeTimeout.
	Timeout time.Duration
}

Prober asks the runner over its own RPC listener, with the runner's own certificate, which process is answering. It is how the executor tells a restart took and the new build is ready. The config is re-read on every probe: the runner rewrites it on start, and the listen address is the part that can change across the restart being verified.

func (*Prober) Probe

Jump to

Keyboard shortcuts

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