services

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager owns the runtime provider registry and reconciles it against the store. providers is keyed by runtime kind; defaultKind is the kind used when a deployment or service does not name one — which is every service today, since Docker is the only registered runtime.

func NewManager

func NewManager(provider runtime.Provider, cat *catalog.Catalog, st *store.Store) *Manager

NewManager builds a Manager whose registry holds the given provider under defaultRuntimeKind, which also becomes the default kind. The signature is unchanged: callers still pass the single Docker provider, so the app stays single-runtime in behavior until a second provider is registered.

func (*Manager) Deploy

func (m *Manager) Deploy(ctx context.Context, slug string, credentials map[string]string) (store.Deployment, error)

func (*Manager) HasNativeRuntime added in v0.10.0

func (m *Manager) HasNativeRuntime() bool

HasNativeRuntime reports whether a provider is registered under the native runtime kind. Native execution has no external dependency (no daemon or socket to reach), so a registered native provider is by construction available — the app surfaces this alongside Docker's Status so onboarding can proceed on either signal. It reflects registration only; it never probes a running process.

func (*Manager) List added in v0.10.0

func (m *Manager) List(ctx context.Context) ([]runtime.ContainerInfo, error)

List returns every managed unit across all registered providers as a single flat slice — the monitoring/health view used by the app's health sampler. An error is returned only when no provider listed successfully; a partial failure yields the healthy providers' units (the failing provider's error is non-fatal). With just Docker registered this returns Docker's list unchanged, or Docker's error.

func (*Manager) Logs

func (m *Manager) Logs(ctx context.Context, slug string, lines int) (string, error)

func (*Manager) Refresh

func (m *Manager) Refresh(ctx context.Context) ([]store.Deployment, error)

func (*Manager) Register added in v0.10.0

func (m *Manager) Register(kind string, provider runtime.Provider)

Register adds a provider under the given runtime kind. It is the registration point the app uses to plug in additional runtimes (e.g. the native process runtime) after construction. Call it during Startup before the manager is shared with background reconciliation goroutines; it is not synchronized against a running Refresh.

func (*Manager) Remove

func (m *Manager) Remove(ctx context.Context, slug string) error

func (*Manager) Restart

func (m *Manager) Restart(ctx context.Context, slug string) error

func (*Manager) Start added in v0.6.0

func (m *Manager) Start(ctx context.Context, slug string) error

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context, slug string) error

Jump to

Keyboard shortcuts

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