Versions in this module Expand all Collapse all v0 v0.2.5 Nov 13, 2025 v0.2.4 Nov 9, 2025 Changes in this version + func GetCurrentState(ctx context.Context, cli DockerClient, stackName string) (*plan.CurrentState, error) + type DeploymentResult struct + DeployID string + UpdatedServices []ServiceUpdateResult + type DockerClient interface + Close func() error + ContainerInspect func(ctx context.Context, containerID string) (types.ContainerJSON, error) + ContainerList func(ctx context.Context, options container.ListOptions) ([]types.Container, error) + ContainerRemove func(ctx context.Context, containerID string, options container.RemoveOptions) error + ImagePull func(ctx context.Context, refStr string, options image.PullOptions) (io.ReadCloser, error) + NetworkCreate func(ctx context.Context, name string, options network.CreateOptions) (network.CreateResponse, error) + NetworkInspect func(ctx context.Context, networkID string, options network.InspectOptions) (network.Inspect, error) + NetworkList func(ctx context.Context, options network.ListOptions) ([]network.Summary, error) + NetworkRemove func(ctx context.Context, networkID string) error + ServiceCreate func(ctx context.Context, service swarm.ServiceSpec, ...) (swarm.ServiceCreateResponse, error) + ServiceInspectWithRaw func(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error) + ServiceList func(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) + ServiceRemove func(ctx context.Context, serviceID string) error + ServiceUpdate func(ctx context.Context, serviceID string, version swarm.Version, ...) (swarm.ServiceUpdateResponse, error) + TaskList func(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) + VolumeCreate func(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) + VolumeInspect func(ctx context.Context, volumeID string) (volume.Volume, error) + VolumeList func(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error) + type MockDockerClient struct + func (m *MockDockerClient) Close() error + func (m *MockDockerClient) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) + func (m *MockDockerClient) ContainerList(ctx context.Context, options container.ListOptions) ([]types.Container, error) + func (m *MockDockerClient) ContainerRemove(ctx context.Context, containerID string, options container.RemoveOptions) error + func (m *MockDockerClient) ImagePull(ctx context.Context, refStr string, options image.PullOptions) (io.ReadCloser, error) + func (m *MockDockerClient) NetworkCreate(ctx context.Context, name string, options network.CreateOptions) (network.CreateResponse, error) + func (m *MockDockerClient) NetworkInspect(ctx context.Context, networkID string, options network.InspectOptions) (network.Inspect, error) + func (m *MockDockerClient) NetworkList(ctx context.Context, options network.ListOptions) ([]network.Summary, error) + func (m *MockDockerClient) NetworkRemove(ctx context.Context, networkID string) error + func (m *MockDockerClient) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, ...) (swarm.ServiceCreateResponse, error) + func (m *MockDockerClient) ServiceInspectWithRaw(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error) + func (m *MockDockerClient) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) + func (m *MockDockerClient) ServiceRemove(ctx context.Context, serviceID string) error + func (m *MockDockerClient) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, ...) (swarm.ServiceUpdateResponse, error) + func (m *MockDockerClient) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) + func (m *MockDockerClient) VolumeCreate(ctx context.Context, options volume.CreateOptions) (volume.Volume, error) + func (m *MockDockerClient) VolumeInspect(ctx context.Context, volumeID string) (volume.Volume, error) + func (m *MockDockerClient) VolumeList(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error) + type ResourceSnapshot struct + Networks map[string]string + Volumes map[string]string + type ServiceSnapshot struct + Service swarm.Service + Tasks []swarm.Task + type ServiceUpdateResult struct + Changed bool + DeployID string + ServiceID string + ServiceName string + Version swarm.Version + Warnings []string + type StackDeployer struct + MaxFailedTaskCount int + func NewStackDeployer(cli DockerClient, stackName string, maxFailedTaskCount int) *StackDeployer + func (d *StackDeployer) CreateSnapshot(ctx context.Context) (*StackSnapshot, error) + func (d *StackDeployer) Deploy(ctx context.Context, composeFile *compose.ComposeFile, deployID string) (*DeploymentResult, error) + func (d *StackDeployer) GetStackServices(ctx context.Context) ([]swarm.Service, error) + func (d *StackDeployer) RemoveExitedContainers(ctx context.Context) error + func (d *StackDeployer) RemoveStack(ctx context.Context) error + func (d *StackDeployer) Rollback(ctx context.Context, snapshot *StackSnapshot) error + type StackSnapshot struct + CreatedAt time.Time + ExistingIDs map[string]bool + IsFirstDeploy bool + Resources ResourceSnapshot + Services map[string]ServiceSnapshot + StackName string