Documentation
¶
Overview ¶
Package runner runs sessions as the host of a registered Beekeeper runner.
Index ¶
- func Deregister(ctx context.Context, cfg Config, name string) error
- func ReadCredential(path string) (string, error)
- func Register(ctx context.Context, cfg Config, req api.RegisterRequest) (api.RegisterResponse, error)
- func Run(ctx context.Context, cfg Config, exec executor.Executor, log *slog.Logger) error
- type Config
- type Git
- type Offer
- type Readings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deregister ¶
Deregister deregisters a runner of the configuration's organization with the configuration's credential.
func ReadCredential ¶
ReadCredential reads a single host-owned credential file.
func Register ¶
func Register(ctx context.Context, cfg Config, req api.RegisterRequest) (api.RegisterResponse, error)
Register registers a runner, or updates the registered one, with the configuration's credential: normally its login, the host.
Types ¶
type Config ¶
type Config struct {
ServerURL string `json:"serverURL"`
// Organization and Name are the registered runner this process is.
Organization string `json:"organization"`
Name string `json:"name"`
// TokenFile holds the runner's bearer for Beekeeper, read on every
// request: a projected ServiceAccount token for a cluster runner, or
// the host's own ID token. A runner has a TokenFile or a Login.
TokenFile string `json:"tokenFile,omitempty"`
// Login logs the host in, so the runner's bearer is the host's ID token.
Login *login.Config `json:"login,omitempty"`
// Offer is the runner's offer, which it registers when it starts.
Offer *Offer `json:"offer,omitempty"`
ReadingsFile string `json:"readingsFile"`
ExecutorConfig json.RawMessage `json:"executorConfig,omitempty"`
ContextFiles map[string]string `json:"contextFiles,omitempty"`
Git Git `json:"git,omitempty"`
// contains filtered or unexported fields
}
Config names the coordinator, the registered runner and files owned by this runner's host.
func (Config) Registration ¶
func (c Config) Registration() api.RegisterRequest
Registration is the runner's own registration: its organization, name and offer.
func (Config) ResolveContext ¶
ResolveContext reads only a bundle explicitly mapped by the host.
type Git ¶
type Git struct {
// Access is none (the default), read or write.
Access executor.GitAccess `json:"access,omitempty"`
}
Git bounds the host's git power in this runner's sessions.
type Offer ¶
type Offer struct {
Kind v1alpha1.RunnerKind `json:"kind,omitempty"`
Slots int32 `json:"slots"`
Focus string `json:"focus,omitempty"`
Purposes []string `json:"purposes,omitempty"`
Harnesses []api.Harness `json:"harnesses,omitempty"`
Capabilities []string `json:"capabilities,omitempty"`
Limits v1alpha1.PressureLimits `json:"limits,omitempty"`
}
Offer is what a runner offers: a registration without its organization, name and ServiceAccount (api.RegisterRequest).
Directories
¶
| Path | Synopsis |
|---|---|
|
Package login logs a runner's host in at their OIDC issuer and keeps the login.
|
Package login logs a runner's host in at their OIDC issuer and keeps the login. |
|
logintest
Package logintest is an OIDC issuer for tests of a runner host's login: discovery, the authorization endpoint with PKCE, and a token endpoint that rotates refresh tokens and refuses a spent one.
|
Package logintest is an OIDC issuer for tests of a runner host's login: discovery, the authorization endpoint with PKCE, and a token endpoint that rotates refresh tokens and refuses a spent one. |