mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
refactor: postpone spec resolver initialisation when creating Deployment
This commit is contained in:
1 parent
2d923380a3
commit
58b51b974c
10 files changed
+48
-90
No files matched your search
@@ -1,15 +1,12 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/psviderski/uncloud/pkg/api"
|
||||
"github.com/psviderski/uncloud/pkg/client/deploy"
|
||||
)
|
||||
|
||||
// NewDeployment creates a new deployment for the given service specification.
|
||||
// If strategy is nil, a default deploy.RollingStrategy will be used.
|
||||
func (cli *Client) NewDeployment(
|
||||
ctx context.Context, spec api.ServiceSpec, strategy deploy.Strategy,
|
||||
) (*deploy.Deployment, error) {
|
||||
return deploy.NewDeployment(ctx, cli, spec, strategy)
|
||||
func (cli *Client) NewDeployment(spec api.ServiceSpec, strategy deploy.Strategy) *deploy.Deployment {
|
||||
return deploy.NewDeployment(cli, spec, strategy)
|
||||
}
|
||||
Reference in new issue
Block a user