provider

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("unsupported connection")

Functions

func UniqueNamespaces

func UniqueNamespaces(workloads []model.Workload) []string

func Unsupported

func Unsupported(c model.Connection) error

Types

type AgentProviderFactory

type AgentProviderFactory interface {
	ProviderForAgent(connection model.Connection) (Provider, error)
}

type DirectFactory

type DirectFactory struct {
	Secrets  *store.SecretStore
	Settings func() model.Settings
	Agents   AgentProviderFactory
}

func (*DirectFactory) ProviderFor

func (f *DirectFactory) ProviderFor(connection model.Connection) (Provider, error)

type DockerController added in v0.1.2

type DockerController interface {
	RestartContainer(ctx context.Context, containerID string, timeoutSeconds int) error
	DeleteContainer(ctx context.Context, containerID string, force bool) error
	RestartComposeProject(ctx context.Context, project string, timeoutSeconds int) (int, error)
}

DockerController is an optional direct-provider capability. The server only calls it after verifying that the saved Docker connection explicitly allows runtime changes.

type Factory

type Factory interface {
	ProviderFor(connection model.Connection) (Provider, error)
}

type Provider

type Provider interface {
	Test(ctx context.Context) (model.ProviderInfo, error)
	Namespaces(ctx context.Context) ([]string, error)
	ListWorkloads(ctx context.Context) ([]model.Workload, error)
	ListMetrics(ctx context.Context) ([]model.WorkloadMetric, error)
	Stream(ctx context.Context, request model.StreamRequest, out chan<- model.ActivityRecord) error
	StreamMetrics(ctx context.Context, request model.MetricRequest, out chan<- model.WorkloadMetric) error
}

func NewDockerProvider

func NewDockerProvider(connection model.Connection, secrets *store.SecretStore) (Provider, error)

func NewDockerRuntimeProvider

func NewDockerRuntimeProvider(connectionID, name, endpoint string, material dockerapi.TLSMaterial) (Provider, error)

NewDockerRuntimeProvider creates a Docker provider for the remote agent. It accepts already-loaded TLS material because the agent reads secrets from its local filesystem or environment rather than Runwake's encrypted store.

type WorkloadStreamer

type WorkloadStreamer interface {
	StreamWorkloads(ctx context.Context, out chan<- model.Workload) error
}

WorkloadStreamer is an optional provider capability used by the workload inventory endpoint. Providers that implement it can surface each workload as soon as its backing runtime returns it instead of waiting for a full snapshot.

Jump to

Keyboard shortcuts

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