Documentation
¶
Overview ¶
Package plugins is the host side of Loomux's plugin system (LOOM-178, docs/design/target-providers.md §1): the manifest, the catalog of available plugins, the supervisor of a running one, and the manager that installs, configures and runs them.
Index ¶
- Constants
- Variables
- func DialSocket(ctx context.Context, path string) (*rpc.Conn, error)
- func ExecutableName(name string) string
- func MergeSecrets(stored, update map[string]string) map[string]string
- func Refused(err error) bool
- func SeedSummary(actions []SeedAction) string
- func ValidPluginLabel(label string) bool
- func ValidPluginName(name string) bool
- type Available
- type CapabilityDroppedError
- type CapabilityMissingError
- type Catalog
- type CheckFailedError
- type ConfigError
- type HasMachinesError
- type HealthReport
- type IncompatibleError
- type InstallRequest
- type Instance
- type InstanceOptions
- type InstanceStatus
- type Manager
- func (m *Manager) ApplySeed(ctx context.Context, s *Seed, dryRun bool) (actions []SeedAction, pending bool)
- func (m *Manager) Available(ctx context.Context) ([]Available, error)
- func (m *Manager) Call(ctx context.Context, id, method string, params, result any) error
- func (m *Manager) Capabilities(ctx context.Context, id string) ([]string, error)
- func (m *Manager) Check(ctx context.Context, id string) (*View, error)
- func (m *Manager) Close(ctx context.Context) error
- func (m *Manager) Disable(ctx context.Context, id string) (*View, error)
- func (m *Manager) Enable(ctx context.Context, id string) (*View, error)
- func (m *Manager) Get(ctx context.Context, id string) (*View, error)
- func (m *Manager) Health(ctx context.Context) HealthReport
- func (m *Manager) Install(ctx context.Context, r InstallRequest) (*View, error)
- func (m *Manager) List(ctx context.Context) ([]*View, error)
- func (m *Manager) RunSeed(ctx context.Context, s *Seed, dryRun bool) bool
- func (m *Manager) Running(id string) bool
- func (m *Manager) SetConfig(ctx context.Context, id string, config map[string]any) (*View, error)
- func (m *Manager) StartAll(ctx context.Context) error
- func (m *Manager) Uninstall(ctx context.Context, id, targets string) error
- func (m *Manager) Upgrade(ctx context.Context, id string) (*View, error)
- type Manifest
- func (m *Manifest) Equal(o *Manifest) bool
- func (m *Manifest) HasCapability(c string) bool
- func (m *Manifest) HostCompatible(host string) error
- func (m *Manifest) ProtocolMajor() (int, error)
- func (m *Manifest) SameCapabilitiesAndSchema(o *Manifest) bool
- func (m *Manifest) Schema() (*Schema, error)
- func (m *Manifest) Validate() error
- type Permission
- type PluginHealth
- type Property
- type Schema
- func (s *Schema) ApplyDefaults(config map[string]any) map[string]any
- func (s *Schema) FollowDefaults(config map[string]any, from *Schema) map[string]any
- func (s *Schema) SecretFields() []string
- func (s *Schema) Split(config map[string]any) (plain map[string]any, secrets map[string]string)
- func (s *Schema) Validate(config map[string]any) error
- type SecretRef
- type Seed
- type SeedAction
- type SeedEntry
- type SeedMachine
- type UnverifiedError
- type Verifier
- type View
Constants ¶
const ( // IsolationNone: a subprocess, loomuxd's own user; it could read // loomuxd's database and environment. IsolationNone = "none" // IsolationContainer: a sidecar reached over a socket; its own user // and mounts. IsolationContainer = "container" )
Isolation values (Available.Isolation): what separates the plugin from loomuxd's process.
const ( // StateRunning: connected, configured, taking calls. StateRunning = "running" // StateRestarting: the process exited (or the socket dropped) and // the instance is bringing it back; calls are unavailable. StateRestarting = "restarting" // StateFailed: given up (three exits in five minutes, or a handshake // that keeps failing); Reason says why. Stop and Start again to // retry. StateFailed = "failed" // StateStopped: Stop was called. StateStopped = "stopped" )
Instance states (InstanceStatus.State).
const ( DefaultCallTimeout = 30 * time.Second DefaultStopTimeout = 10 * time.Second DefaultRestartBackoff = time.Second DefaultReconnectInterval = 2 * time.Second )
Defaults an InstanceOptions zero value gets.
const ( UninstallDestroy = "destroy" UninstallKeep = "keep" )
What an uninstall does with the plugin's machines (design §1.5).
const ( DefaultSocketWait = 10 * time.Minute DefaultSocketWaitBackoff = time.Second DefaultSocketWaitMaxBackoff = 30 * time.Second )
Defaults for a Manager's socket wait (#465): as long as the seed retries a missing plugin (LOOM-219).
const ( SeedCreate = "create" SeedUpdate = "update" SeedUnchanged = "unchanged" SeedNotOurs = "not the seed's" SeedKeep = "keep" SeedPrune = "prune" SeedError = "error" )
What ApplySeed does with an instance (SeedAction.Do).
const ManifestFile = "plugin.json"
ManifestFile is the manifest's file name in a plugin's directory.
const ProtocolV1 = protocol.Version
ProtocolV1 is the protocol this host speaks.
const ReasonWaitingForSocket = "waiting for the sidecar's socket"
ReasonWaitingForSocket is the instance reason (state restarting) of a sidecar plugin whose socket isn't there yet.
Variables ¶
var ErrBadLabel = errors.New("plugins: label: lowercase letters, digits and '-' only, at most 32, starting with a letter or digit")
ErrBadLabel is an install with a label outside the grammar.
var ErrBadUninstallMode = errors.New("plugins: targets must be destroy or keep")
ErrBadUninstallMode is an uninstall with a targets choice that isn't destroy or keep.
var ErrManifestMismatch = errors.New("plugins: the plugin's manifest doesn't match the one on disk")
ErrManifestMismatch is a plugin whose describe doesn't match the manifest the host read for it.
var ErrNotAvailable = errors.New("plugins: not available")
ErrNotAvailable is a plugin the catalog doesn't have.
ErrUnavailable is a call while the instance isn't running.
var KnownCapabilities = []string{
"targets.create",
"targets.stop_start",
"targets.recreate",
"targets.persistent",
"targets.ephemeral",
"targets.egress_policy",
"targets.attach_commands",
"targets.attach_read_only",
}
KnownCapabilities are the capabilities a manifest may declare. Each maps to UI affordances and host behaviour; the host refuses a method a plugin didn't declare.
Functions ¶
func DialSocket ¶
DialSocket connects to a plugin's unix socket.
func ExecutableName ¶
ExecutableName is the executable's name in a plugin's directory.
func MergeSecrets ¶
Merge returns stored with the keys of update written over it (an update's secret omitted keeps the stored one; "" clears it).
func Refused ¶ added in v0.3.78
Refused reports whether err is an *IncompatibleError the host acts on (as opposed to one it only warns about).
func SeedSummary ¶ added in v0.3.112
func SeedSummary(actions []SeedAction) string
SeedSummary is actions on one line: "label: do (detail) [warning]; …".
func ValidPluginLabel ¶
ValidPluginLabel reports whether label can name an installed plugin.
func ValidPluginName ¶
ValidPluginName reports whether name can name a plugin.
Types ¶
type Available ¶
type Available struct {
Manifest Manifest
Source registry.PluginSource
// Path is the plugin's directory, or its socket.
Path string
Trust string
// TrustReason is why a plugin from the plugin directory isn't
// verified, "" when it is or doesn't need to be (LOOM-218).
TrustReason string
Isolation string
// Incompatible is why this host refuses the plugin (below its
// min_host_version, or another major: Manifest.HostCompatible), ""
// when it doesn't; an install answers 409 with it. Warning is why
// the plugin may not match this host though it runs (built for an
// older 0.Y). The entry is listed either way, so the UI can say.
Incompatible string
Warning string
}
Available is a plugin the catalog found (installed or not).
type CapabilityDroppedError ¶
type CapabilityDroppedError struct{ Capability string }
CapabilityDroppedError: an upgrade whose new manifest lacks a capability the plugin's machines rely on.
func (*CapabilityDroppedError) Error ¶
func (e *CapabilityDroppedError) Error() string
type CapabilityMissingError ¶ added in v0.3.69
type CapabilityMissingError struct{ Method, Capability string }
ErrCapabilityMissing is a call of a method the plugin's manifest doesn't declare the capability for.
func (*CapabilityMissingError) Error ¶ added in v0.3.69
func (e *CapabilityMissingError) Error() string
type Catalog ¶
type Catalog struct {
BundleDir string
PluginDir string
SocketDir string
Verifier Verifier
Logger *slog.Logger
// HostVersion is this server's version string (version.Version),
// against which every manifest's min_host_version is checked.
HostVersion string
}
Catalog finds plugins in the three places the host looks (design §1.8): the image's bundle directory, the operator's plugin directory, and the socket directory where sidecars listen. An empty directory setting is skipped.
func (*Catalog) Available ¶
Available lists every plugin found, bundled first, then the plugin directory's, then sockets, each group by name. An entry that can't be read (a bad manifest, a missing executable, a socket nobody answers on) is logged and skipped; the listing itself only fails when a configured directory can't be read.
type CheckFailedError ¶
CheckFailedError: the plugin started but can't work; Reason says why in one line and Problems carry its check's findings, if it got that far.
func (*CheckFailedError) Error ¶
func (e *CheckFailedError) Error() string
type ConfigError ¶
ConfigError says which configuration field is wrong and how; safe to show.
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
type HasMachinesError ¶
type HasMachinesError struct{ N int }
HasMachinesError: an uninstall of a plugin that still owns machines, with no choice made for them.
func (*HasMachinesError) Error ¶
func (e *HasMachinesError) Error() string
type HealthReport ¶
type HealthReport struct {
// Status is healthy (every enabled plugin runs and checks ok, or
// none is installed) or degraded.
Status string
Error string
Plugins map[string]PluginHealth
}
HealthReport is the plugin system's health for GET /health/deep.
type IncompatibleError ¶ added in v0.3.78
IncompatibleError: a manifest built for another Loomux than this host (LOOM-194). Refuse says the host won't run it (below its min_host_version, or another major); otherwise it runs, warned about: a plugin built for an older 0.Y than the host's. Safe to show.
func (*IncompatibleError) Error ¶ added in v0.3.78
func (e *IncompatibleError) Error() string
type InstallRequest ¶
type InstallRequest struct {
Name string
Source registry.PluginSource
Label string
Config map[string]any
}
InstallRequest is what Install needs.
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
Instance is one running plugin: a supervised subprocess, or a connection to a sidecar's socket, kept up until Stop.
func Start ¶
func Start(ctx context.Context, o InstanceOptions) (*Instance, error)
Start starts (or connects to) the plugin, runs the handshake (describe must match o.Manifest) and configures it. A handshake failure returns the error with nothing left running.
func (*Instance) Call ¶
Call sends method to the plugin with the call deadline. While the instance isn't running it returns ErrUnavailable.
func (*Instance) Status ¶
func (i *Instance) Status() InstanceStatus
Status is the instance's state.
type InstanceOptions ¶
type InstanceOptions struct {
Label string
Source registry.PluginSource
// Path is the plugin's directory (subprocess) or socket.
Path string
Manifest *Manifest
// Config is the whole configuration, secrets included, for
// plugin.configure.
Config map[string]any
Host protocol.HostInfo
Logger *slog.Logger
// OnCall, if set, is told about every call's outcome (for metrics).
OnCall func(method string, err error)
// Redact, if set, scrubs text the plugin produced (stderr lines,
// handshake errors) before it is kept or logged: the plugin's own
// secrets must not come back out through it.
Redact func(string) string
// OnState, if set, is told of every state change, outside the
// instance's lock; it must not block on a Stop of this instance.
OnState func(i *Instance, st InstanceStatus)
// OnNotify, if set, receives the plugin's notifications.
OnNotify func(method string, params json.RawMessage)
CallTimeout time.Duration
StopTimeout time.Duration
RestartBackoff time.Duration
ReconnectInterval time.Duration
}
InstanceOptions is what Start needs.
type InstanceStatus ¶
InstanceStatus is where a running plugin is.
type Manager ¶
type Manager struct {
// MachineCounter reports how many machines a plugin instance owns.
// Nil means none (before the target-provider capability exists).
MachineCounter func(ctx context.Context, pluginID string) (int, error)
// UninstallMachines deals with a plugin's machines on uninstall,
// mode UninstallDestroy or UninstallKeep. Nil means there are none
// to deal with.
UninstallMachines func(ctx context.Context, pluginID, mode string) error
// InstanceOptions, if set, adjusts every instance's options before
// it starts (tests shorten the supervisor's timings).
InstanceOptions func(*InstanceOptions)
// OnNotify, if set, receives every plugin's notifications with the
// plugin instance's id.
OnNotify func(pluginID, method string, params json.RawMessage)
// RequireVerified refuses to install, upgrade to or start a plugin
// from the plugin directory that nothing vouches for (LOOM-218,
// verify.go; plugins/attest verifies): the app sets it unless
// LOOMUX_PLUGIN_ALLOW_UNSIGNED.
// Bundled plugins and sidecars aren't affected.
RequireVerified bool
// SocketWait is how long a sidecar plugin whose socket isn't there
// yet (no such file, or nothing listening on it) keeps being started
// again before its row is marked error (#465). The retries back off
// from SocketWaitBackoff, doubling, up to SocketWaitMaxBackoff.
// NewManager sets the defaults; a zero SocketWait fails at once.
SocketWait, SocketWaitBackoff, SocketWaitMaxBackoff time.Duration
// contains filtered or unexported fields
}
Manager installs, configures and runs plugins (design §1.5). It owns the rows and the running instances; nothing else touches either. Lifecycle operations on one plugin are serialised by a lock per plugin id, so two requests (a double-click, a boot racing an enable) can never leave an instance running that the Manager doesn't know.
func NewManager ¶
func NewManager(store registry.Store, catalog *Catalog, host protocol.HostInfo, logger *slog.Logger, met *metrics.Metrics) *Manager
NewManager makes a Manager over store and catalog. host is what every plugin is told at configure; met may be nil.
func (*Manager) ApplySeed ¶ added in v0.3.105
func (m *Manager) ApplySeed(ctx context.Context, s *Seed, dryRun bool) (actions []SeedAction, pending bool)
ApplySeed brings the installed plugins in line with s, as its doc says, and returns what it did; with dryRun it only works out and returns what it would do. pending reports entries that failed before anything was made (their plugin isn't in the catalog yet: a sidecar still starting), which a later ApplySeed may complete.
func (*Manager) Call ¶ added in v0.3.69
Call sends method to the plugin instance id, refusing a method whose capability the installed manifest doesn't declare, and ErrUnavailable while the instance isn't running. Errors a plugin answers with come back as *rpc.Error, their text redacted.
func (*Manager) Capabilities ¶ added in v0.3.69
Capabilities are the installed manifest's, for plugin id.
func (*Manager) Check ¶
Check runs the plugin's check again and records the result. While the instance is restarting (a transient the supervisor is handling) the row is left alone and the error is ErrUnavailable.
func (*Manager) Disable ¶
Disable stops the plugin and keeps everything else. Its machines keep working as plain targets; only lifecycle control pauses.
func (*Manager) Enable ¶
Enable starts a disabled plugin (or retries one in error). A plugin already running is left as it is.
func (*Manager) Health ¶
func (m *Manager) Health(ctx context.Context) HealthReport
Health reports every installed plugin.
func (*Manager) Install ¶
Install installs a plugin from the catalog with config, starts it, and checks it. The row is kept on a failure (status error) so the configuration can be fixed; the error then is a *CheckFailedError.
func (*Manager) RunSeed ¶ added in v0.3.105
RunSeed logs what s would do, as one "plugins seed plan" line, and unless dryRun applies it, logging each instance's outcome (an error as a warning). It reports whether entries are pending (ApplySeed).
func (*Manager) SetConfig ¶
SetConfig replaces the plugin's configuration: a secret left out keeps its stored value, "" clears it. A running plugin is reconfigured and checked again; one in error is started again.
func (*Manager) StartAll ¶
StartAll starts every enabled plugin at boot. A failure marks its row and goes on; the error returned is them joined, for the log.
func (*Manager) Uninstall ¶
Uninstall stops the plugin, deals with its machines as targets says (required when it has any), erases its secrets and removes the row.
func (*Manager) Upgrade ¶
Upgrade moves the plugin to the catalog's version of it. No-op when the versions match. The new version is started beside the old one and checked; only then is the old one stopped and the row changed. If the new one can't start or fails its check, it is stopped again, the old version keeps running, the row keeps its version, and the error is a *CheckFailedError.
type Manifest ¶
type Manifest struct {
Name string `json:"name"`
Title string `json:"title"`
Version string `json:"version"`
Protocol string `json:"protocol"`
Vendor string `json:"vendor"`
Homepage string `json:"homepage"`
Description string `json:"description"`
MinHostVersion string `json:"min_host_version"`
Capabilities []string `json:"capabilities"`
Permissions []Permission `json:"permissions"`
HostRequests []string `json:"host_requests"`
ConfigSchema json.RawMessage `json:"config_schema,omitempty"`
}
Manifest describes a plugin (plugin.json beside its executable, or what plugin.describe returns).
func DescribeSocket ¶
DescribeSocket asks the plugin on path for its manifest, validated.
func ParseManifest ¶
ParseManifest reads and validates a manifest. Unknown fields are ignored: a newer plugin may carry more than this host knows.
func (*Manifest) Equal ¶
Equal reports whether two manifests agree on what the host compares at the handshake: name, version, protocol and capabilities.
func (*Manifest) HasCapability ¶
HasCapability reports whether the manifest declares c.
func (*Manifest) HostCompatible ¶ added in v0.3.78
HostCompatible checks this host's version against the manifest's min_host_version (user decision 2026-10-11): nil when it is met on the same line; an *IncompatibleError with Refuse when the host is below the minimum or on another major (from 1.0, the major is the compatibility unit); one without Refuse, a warning, when the plugin was built for an older 0.Y than the host's (under 0.x the minor is the unit, but such a plugin still runs). A manifest without a minimum, or a host without a version (dev, a plain commit build), is compatible with anything.
func (*Manifest) ProtocolMajor ¶
ProtocolMajor parses the manifest's protocol ("loomux-plugin/1").
func (*Manifest) SameCapabilitiesAndSchema ¶ added in v0.3.78
SameCapabilitiesAndSchema reports whether o declares the same capabilities (as a set) and the same configuration schema as m, whatever its version: what lets the host adopt a plugin's new version without an upgrade (D3, LOOM-194). Defaults are not part of the schema's shape: a stamped build changes the agent_image default with every agent rebuild, and a stored setting that still equals the old default follows the new one at adoption (Manager.followDefaults).
type Permission ¶
Permission is one thing a plugin declares it needs on the infrastructure: for informed consent, shown before install.
type PluginHealth ¶
type PluginHealth struct {
Name string `json:"name"`
Status string `json:"status"`
Instance string `json:"instance,omitempty"`
Reason string `json:"reason,omitempty"`
CheckOK bool `json:"check_ok"`
Machines int `json:"machines"`
}
PluginHealth is one plugin's line in the report.
type Property ¶
type Property struct {
Type string `json:"type"`
Description string `json:"description"`
Default any `json:"default"`
Enum []any `json:"enum"`
Minimum *float64 `json:"minimum"`
// Secret fields are stored encrypted, never returned, and shown as
// set/not set. Only a string may be secret, and only at the top
// level.
Secret bool `json:"x-secret"`
// Format tells the UI which widget to show: ssh-private-key,
// kubeconfig, image-reference, socks5-url.
Format string `json:"x-format"`
Properties map[string]*Property `json:"properties"`
Required []string `json:"required"`
AdditionalProperties *Property `json:"additionalProperties"`
}
Property is one schema property.
type Schema ¶
type Schema struct {
Type string `json:"type"`
Properties map[string]*Property `json:"properties"`
Required []string `json:"required"`
// AdditionalProperties, when set, is the schema of any key not in
// Properties (a map of sizes); nil refuses unknown keys.
AdditionalProperties *Property `json:"additionalProperties"`
}
Schema is the subset of JSON Schema a manifest's config_schema may use: an object of string, integer, number, boolean and object properties, with required, enum, default, x-secret and x-format. The web renders it as a form.
func (*Schema) ApplyDefaults ¶
ApplyDefaults returns a copy of config with every absent top-level field that has a default filled in.
func (*Schema) FollowDefaults ¶ added in v0.3.79
FollowDefaults returns a copy of config in which every top-level setting that still equals from's default, where s's default differs, is set to s's default: a setting the operator never changed follows the plugin's new default (the stamped agent image pin, LOOM-194), one they set stays. Secret fields are never touched.
func (*Schema) SecretFields ¶
SecretFields are the top-level fields marked x-secret, sorted.
type SecretRef ¶ added in v0.3.105
SecretRef says where a secret's value is: exactly one of an environment variable or a file (its content, trailing newlines trimmed).
type Seed ¶ added in v0.3.105
type Seed struct {
// Prune uninstalls the instances the seed made and no longer lists
// (those without machines).
Prune bool `json:"prune"`
Plugins []SeedEntry `json:"plugins"`
// Machines are persistent machines to make on those instances
// (LOOM-236): made when missing, their policy kept as the seed says,
// never destroyed (prune doesn't apply to them).
Machines []SeedMachine `json:"machines"`
}
Seed is LOOMUX_PLUGINS_SEED.
type SeedAction ¶ added in v0.3.105
type SeedAction struct {
Label string
Do string
Detail string
// Warning is what the seed asks for and didn't do because only the
// API may (a machine change that needs a recreate): logged as a
// warning beside the action.
Warning string
}
SeedAction is what ApplySeed did, or would do, with one instance (or ApplyMachineSeed with one machine, Label then its name).
type SeedEntry ¶ added in v0.3.105
type SeedEntry struct {
// Label names the instance, and is what the seed matches it by.
Label string `json:"label"`
// Plugin and Source are the manifest's name and where it comes from
// (bundled, dir, socket), as POST /api/v1/plugins takes them.
Plugin string `json:"plugin"`
Source registry.PluginSource `json:"source"`
// Config is the configuration without its secret fields.
Config map[string]any `json:"config"`
// Secrets are the secret fields, each read from an environment
// variable or a file.
Secrets map[string]SecretRef `json:"secrets"`
}
SeedEntry is one plugin instance the seed declares.
type SeedMachine ¶ added in v0.3.112
type SeedMachine struct {
Name string `json:"name"`
// Plugin is the label of the plugin instance that makes it (seeded
// or not).
Plugin string `json:"plugin"`
// Size, Persistent and Egress shape the machine; empty or left out
// is the plugin's default. On an existing machine they are only
// compared: changing one needs a recreate or a new machine, which the
// seed logs and leaves to the API.
Size string `json:"size"`
Persistent *bool `json:"persistent"`
Egress string `json:"egress"`
// The target options a machine takes (POST and PUT /api/v1/targets);
// these can change on an existing machine, and the seed keeps them.
PermissionMode *string `json:"permission_mode"`
Purpose *string `json:"purpose"`
AllowedAgentTypes *[]string `json:"allowed_agent_types"`
AllowProvision *bool `json:"allow_provision"`
AllowShell *bool `json:"allow_shell"`
RequireConfirmation *bool `json:"require_confirmation"`
Relay *string `json:"relay"`
// KeepIdleSessions exempts the machine's sessions from the idle
// reaper (LOOM-227), as a hub's must be.
KeepIdleSessions *bool `json:"keep_idle_sessions"`
}
SeedMachine is one machine the seed declares: a target a plugin instance makes, as POST /api/v1/targets with a plugin object would. Name is the target's name, and is what the seed matches it by. A pointer field left out says nothing: the API's default on a create, the machine's current value after that.
func (SeedMachine) ApplyTargetOptions ¶ added in v0.3.112
func (m SeedMachine) ApplyTargetOptions(t *registry.Target)
ApplyTargetOptions sets on t the target options m gives, spelled the way the store keeps them (as the API's target decoding does).
type UnverifiedError ¶ added in v0.3.111
type UnverifiedError struct {
Plugin, Reason string
}
UnverifiedError refuses to install or upgrade a plugin from the plugin directory that nothing vouches for (LOOM-218).
func (*UnverifiedError) Error ¶ added in v0.3.111
func (e *UnverifiedError) Error() string
type Verifier ¶
type Verifier interface {
// Verify is the trust of the plugin executable at path:
// registry.PluginTrustSignedPrefix + the identity that signed it, or
// registry.PluginTrustPinnedPrefix + its pinned digest; else
// registry.PluginTrustUnsigned and why, for the person refused.
Verify(ctx context.Context, path string) (trust, why string)
}
Verifier decides the trust of a plugin from the plugin directory (design §1.6, LOOM-218: AttestationVerifier). Nil means every such plugin is unsigned.
type View ¶
type View struct {
registry.Plugin
// AvailableVersion is the catalog's version of the same plugin from
// the same source, "" when it isn't in the catalog any more.
AvailableVersion string
// Check is the last check's result, nil if none ran.
Check *protocol.CheckResult
// Instance is the running instance's state; State "" when none runs.
Instance InstanceStatus
// Machines is how many machines the plugin owns.
Machines int
// SecretsUnreadable: the stored secrets don't decrypt with this
// server's master key.
SecretsUnreadable bool
}
View is an installed plugin as the API shows it: the row with its secrets replaced by whether each is set, plus what is only known at run time.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package attest verifies plugin executables for loomuxd (LOOM-218): the plugins.Verifier the catalog asks about plugins from the plugin directory.
|
Package attest verifies plugin executables for loomuxd (LOOM-218): the plugins.Verifier the catalog asks about plugins from the plugin directory. |
|
Package fake is a plugin for tests (docs/design/target-providers.md §12): no infrastructure behind it, and a configuration that scripts how it behaves, so the host's supervisor, manager and API can be exercised against a real subprocess.
|
Package fake is a plugin for tests (docs/design/target-providers.md §12): no infrastructure behind it, and a configuration that scripts how it behaves, so the host's supervisor, manager and API can be exercised against a real subprocess. |
|
Command manifeststamp writes a release into plugin manifests at build time (LOOM-194; docs/release/versioning.md, "Images"):
|
Command manifeststamp writes a release into plugin manifests at build time (LOOM-194; docs/release/versioning.md, "Images"): |
|
Package plugintest is the conformance suite a loomux-plugin/1 plugin must pass (docs/design/target-providers.md §12): the analogue of registry/storetest and targets/executortest.
|
Package plugintest is the conformance suite a loomux-plugin/1 plugin must pass (docs/design/target-providers.md §12): the analogue of registry/storetest and targets/executortest. |
|
Package protocol is the loomux-plugin/1 protocol's vocabulary: the method names the host calls and the parameter and result types they carry (docs/design/target-providers.md §1.3).
|
Package protocol is the loomux-plugin/1 protocol's vocabulary: the method names the host calls and the parameter and result types they carry (docs/design/target-providers.md §1.3). |
|
Package rpc is the wire layer of loomux-plugin/1 (docs/design/target-providers.md §1.3): JSON-RPC 2.0 messages in Content-Length frames, the LSP convention, over a subprocess's stdio or a unix socket.
|
Package rpc is the wire layer of loomux-plugin/1 (docs/design/target-providers.md §1.3): JSON-RPC 2.0 messages in Content-Length frames, the LSP convention, over a subprocess's stdio or a unix socket. |
|
Package sdk is what a plugin's main calls to speak loomux-plugin/1 (docs/design/target-providers.md §1.3): implement Plugin, hand it to Main, and the plugin serves stdio when started with no arguments or a unix socket with --listen <path> (the sidecar form).
|
Package sdk is what a plugin's main calls to speak loomux-plugin/1 (docs/design/target-providers.md §1.3): implement Plugin, hand it to Main, and the plugin serves stdio when started with no arguments or a unix socket with --listen <path> (the sidecar form). |