core

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CronDisable

func CronDisable(s scope.Scope, g cfg.Configuration, keys []string) error

CronDisable disables the specified cron jobs on all selected nodes.

func CronEnable

func CronEnable(s scope.Scope, g cfg.Configuration, keys []string) error

CronEnable enables the specified cron jobs on all selected nodes.

func CronStatus added in v0.9.0

func CronStatus(s scope.Scope, g cfg.Configuration, keys []string) error

CronStatus prints the status of all cron jobs on the selected nodes.

func Deploy

func Deploy(s scope.Scope, g cfg.Configuration, rel *Release, environ string, setup bool, scale bool) error

Deploy uploads and deploys a release to all nodes in scope.

func Df added in v0.11.0

func Df(s scope.Scope, g cfg.Configuration, options distro.DfOptions) error

Df displays disk usage on the selected node.

func EnvironPush added in v0.14.1

func EnvironPush(s scope.Scope, g cfg.Configuration, filename string, restart bool) error

EnvironPush uploads an environment file to the selected nodes. If the file has changed and restart is true, all running containers are recreated so that they pick up the new environment.

func Forward added in v0.10.0

func Forward(s scope.Scope, g cfg.Configuration, port string) error

Forward sets up port forwarding from the local machine to the selected node.

func Htop added in v0.18.0

func Htop(s scope.Scope, g cfg.Configuration) error

Htop runs the htop command interactively on the selected node.

func Log added in v0.9.0

func Log(s scope.Scope, g cfg.Configuration, key string, no int) error

Log tails the logs of a program's container instance.

func Prune

func Prune(s scope.Scope, g cfg.Configuration) error

Prune removes old releases, keeping the 5 most recent.

func Restart

func Restart(s scope.Scope, g cfg.Configuration) error

Restart restarts all application containers on the selected nodes.

func Run

func Run(s scope.Scope, g cfg.Configuration, key string) error

Run executes a program as a one-off interactive container.

func SSH added in v0.14.1

func SSH(s scope.Scope, g cfg.Configuration) error

SSH opens an interactive SSH session to the selected node.

func Scale

func Scale(s scope.Scope, g cfg.Configuration, comp *Composition) error

Scale adjusts the number of container instances on each node to match the composition.

func SentinelInstall added in v0.17.0

func SentinelInstall(s scope.Scope, g cfg.Configuration, binaryFn SentinelBinaryFunc) error

SentinelInstall pushes the embedded sentinel binary and systemd unit to each selected node and starts the service.

func Setup

func Setup(s scope.Scope, g cfg.Configuration, environ string) error

Setup prepares servers for deployment by installing Docker and creating the application directory.

func Shell added in v0.14.1

func Shell(s scope.Scope, g cfg.Configuration) error

Shell opens an interactive bash session on the selected node.

func Status

func Status(s scope.Scope, g cfg.Configuration) error

Status prints a table of container status across all nodes.

func Top added in v0.12.0

func Top(s scope.Scope, g cfg.Configuration) error

Top runs the top command interactively on the selected node.

Types

type Composition

type Composition struct {
	Sizes map[string]int
}

Composition maps program keys to their desired instance counts.

func DefaultComposition added in v0.10.0

func DefaultComposition(n scope.Node, spec *spec.Spec) (*Composition, error)

DefaultComposition evaluates the scaling rules from the spec against a node's properties.

func NewComposition

func NewComposition(args []string) (*Composition, error)

NewComposition parses "key=count" arguments into a Composition.

type Release

type Release struct {
	Time    string
	Hash    string
	Tarball Tarball
}

Release represents a deployable release, identified by timestamp and content hash.

func NewRelease

func NewRelease(tarPath string) (*Release, error)

NewRelease creates a Release from a tarball path, computing its SHA256 hash.

type SentinelBinaryFunc added in v0.17.0

type SentinelBinaryFunc func(arch string) ([]byte, error)

SentinelBinaryFunc returns the embedded sentinel binary for the given architecture (e.g. "amd64", "arm64"). Implemented by the main package, which owns the embed directives.

type Tarball

type Tarball struct {
	Path string
	Size int64
}

Tarball holds the local path and size of a release archive.

Jump to

Keyboard shortcuts

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