mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
24 lines
611 B
Go
24 lines
611 B
Go
package operation
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/psviderski/uncloud/pkg/api"
|
|
)
|
|
|
|
// Operation represents a single atomic operation in a deployment process.
|
|
// Operations can be composed to form complex deployment strategies.
|
|
type Operation interface {
|
|
// Execute performs the operation using the provided client.
|
|
Execute(ctx context.Context, cli Client) error
|
|
// Format returns a human-readable representation of the operation.
|
|
Format() string
|
|
String() string
|
|
}
|
|
|
|
// Client defines the interface required to execute deployment operations.
|
|
type Client interface {
|
|
api.ContainerClient
|
|
api.VolumeClient
|
|
}
|