host

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package host manages the Miabi stack on the machine the CLI runs on, as opposed to talking to a panel over HTTP. It is the CLI's half of the platform-stack engine: everything Docker-specific lives behind Open, which is stubbed out on platforms that cannot host a stack.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = errors.New("stack management requires a Linux or macOS host with Docker")

ErrUnsupported is returned by Open on a platform with no Docker host to manage.

Functions

func InspectSelfImage

func InspectSelfImage(ctx context.Context, id string) string

InspectSelfImage reads back the image of the container with the given id, so an installer running as a container can pin the exact ref it was started from. Empty when it cannot be determined.

func ManifestPath

func ManifestPath(flag string) string

ManifestPath resolves the manifest to operate on: the --file flag if given, else the platform default (see stack.ManifestPath).

func RequireRoot

func RequireRoot() error

RequireRoot fails early when the process cannot write /etc/miabi or reach the Docker socket, rather than surfacing a permission error from three layers down.

Types

type Session

type Session struct {
	Svc      *stack.Service
	Manifest string
	// contains filtered or unexported fields
}

Session is an open connection to the local Docker engine plus the stack service driving it. Close releases the connection.

func Open

func Open(manifestPath string, log func(string, ...any)) (*Session, error)

Open connects to the local Docker engine and returns a stack service bound to manifestPath. The daemon is pinged before anything else so an unreachable or permission-denied socket is reported once, in the operator's language, instead of failing inside the first converge step.

func (*Session) Close

func (s *Session) Close() error

Close releases the Docker connection.

Jump to

Keyboard shortcuts

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