Documentation
¶
Index ¶
- func Deploy(cfg *config.Config) error
- func DeployWithClient(cfg *config.Config, client Deployer, opts *Options) error
- func Restart(cfg *config.Config) error
- func RestartWithClient(cfg *config.Config, client Deployer, opts *Options) error
- func Rollback(cfg *config.Config) error
- func RollbackWithClient(cfg *config.Config, client Deployer, opts *Options) error
- type Deployer
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployWithClient ¶
DeployWithClient performs a deployment with a custom client (for testing)
func RestartWithClient ¶
RestartWithClient restarts with a custom client (for testing)
Types ¶
type Deployer ¶
type Deployer interface {
GetCurrentVersion(ctx context.Context) (int, error)
MakeTempDir(ctx context.Context) (string, error)
Rsync(ctx context.Context, localPath, remotePath string) error
BuildImage(ctx context.Context, buildDir string, version int) error
UpdateCompose(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, composeContent string) error
EnsureNetwork(ctx context.Context, name string) error
CreateEnvFile(ctx context.Context, serviceName string) error
IsServiceRunning(ctx context.Context, serviceName string) (bool, error)
PullImage(ctx context.Context, image string) error
StartService(ctx context.Context, serviceName string) error
}
Deployer defines the interface for deployment operations
Click to show internal directories.
Click to hide internal directories.