diff options
author | Martin Polden <mpolden@mpolden.no> | 2023-08-21 15:31:44 +0200 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2023-08-21 15:49:17 +0200 |
commit | 5d6cf5d65fc06341d1127d5de586276fb3a1659e (patch) | |
tree | 0ed1002ba1b55f8bc47ed0818370197971aa0796 /client/go/internal/vespa/target_cloud.go | |
parent | ed2099510c7b46a4d8fa643c0469c85c4018a7da (diff) |
Extract Waiter
Diffstat (limited to 'client/go/internal/vespa/target_cloud.go')
-rw-r--r-- | client/go/internal/vespa/target_cloud.go | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/client/go/internal/vespa/target_cloud.go b/client/go/internal/vespa/target_cloud.go index 14b7f1f4c52..24133ba5fc3 100644 --- a/client/go/internal/vespa/target_cloud.go +++ b/client/go/internal/vespa/target_cloud.go @@ -98,21 +98,15 @@ func (t *cloudTarget) IsCloud() bool { return true } func (t *cloudTarget) Deployment() Deployment { return t.deploymentOptions.Deployment } -func (t *cloudTarget) DeployService(timeout time.Duration) (*Service, error) { - service := &Service{ +func (t *cloudTarget) DeployService() (*Service, error) { + return &Service{ BaseURL: t.apiOptions.System.URL, TLSOptions: t.apiOptions.TLSOptions, deployAPI: true, httpClient: t.httpClient, auth: t.apiAuth, retryInterval: t.retryInterval, - } - if timeout > 0 { - if err := service.Wait(timeout); err != nil { - return nil, err - } - } - return service, nil + }, nil } func (t *cloudTarget) ContainerServices(timeout time.Duration) ([]*Service, error) { @@ -160,7 +154,7 @@ func (t *cloudTarget) CheckVersion(clientVersion version.Version) error { if err != nil { return err } - deployService, err := t.DeployService(0) + deployService, err := t.DeployService() if err != nil { return err } @@ -244,7 +238,7 @@ func (t *cloudTarget) PrintLog(options LogOptions) error { } func (t *cloudTarget) deployServiceWait(fn responseFunc, reqFn requestFunc, timeout time.Duration) (int, error) { - deployService, err := t.DeployService(0) + deployService, err := t.DeployService() if err != nil { return 0, err } |