mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
feat: allow to filter machines for global service deployments
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/distribution/reference"
|
||||
"strings"
|
||||
"uncloud/internal/api"
|
||||
"uncloud/internal/machine/api/pb"
|
||||
"uncloud/internal/secret"
|
||||
)
|
||||
|
||||
@@ -25,6 +26,10 @@ type Plan struct {
|
||||
SequenceOperation
|
||||
}
|
||||
|
||||
// MachineFilter determines which machines participate in a deployment operation by returning true for
|
||||
// machines that should be included.
|
||||
type MachineFilter func(m *pb.MachineInfo) bool
|
||||
|
||||
// NewDeployment creates a new deployment for the given service specification.
|
||||
// If strategy is nil, a default RollingStrategy will be used.
|
||||
func (cli *Client) NewDeployment(spec api.ServiceSpec, strategy Strategy) (*Deployment, error) {
|
||||
|
||||
Reference in New Issue
Block a user