Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployWithClient ¶
DeployWithClient performs a deployment with a custom client
func RestartWithClient ¶
RestartWithClient restarts a service without building a new image
Types ¶
type Deployer ¶
type Deployer interface {
GetCurrentVersion(ctx context.Context) (int, error)
ReadManifest(ctx context.Context) (string, error)
MakeTempDir(ctx context.Context) (string, error)
Rsync(ctx context.Context, localPath, remotePath string) error
BuildImage(ctx context.Context, buildDir string, version int) error
UpdateManifest(ctx context.Context, version int) error
RestartStack(ctx context.Context) error
Cleanup(ctx context.Context, path string) error
StackExists(ctx context.Context) (bool, error)
CreateStack(ctx context.Context, content string) error
EnsureNetwork(ctx context.Context, name string) error
CreateEnvFiles(ctx context.Context, serviceNames []string) error
IsServiceRunning(ctx context.Context, serviceName string) (bool, error)
PullImage(ctx context.Context, image string) error
StartService(ctx context.Context, serviceName string) error
RolloutService(ctx context.Context, serviceName string) error
CopyFiles(ctx context.Context, files map[string]string) error
}
Deployer defines the interface for deployment operations
type Options ¶
type Options struct {
// Output is where to write progress messages (defaults to os.Stdout)
Output io.Writer
// Dependencies maps dependency service names to their configs
Dependencies map[string]*config.Config
// AllServices maps all service names to their configs (used for initial stack creation)
AllServices map[string]*config.Config
// BuildOnly builds/pulls the image and updates the manifest but does not start the service.
// Used by deploy-all: build everything first, then start all services at once.
BuildOnly bool
// Runtime is the deployment runtime ("compose" or "k3s")
Runtime string
}
Options holds configuration for the deployment