Skip to content

Commit

Permalink
set default WaitInterval.
Browse files Browse the repository at this point in the history
  • Loading branch information
jolestar authored and pengsrc committed Mar 27, 2017
1 parent 60b6163 commit d326815
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ import (

const (
//InstanceStatusPending pending
InstanceStatusPending = "pending"
InstanceStatusPending = "pending"
//InstanceStatusRunning running
InstanceStatusRunning = "running"
InstanceStatusRunning = "running"
//InstanceStatusStopped stopped
InstanceStatusStopped = "stopped"
InstanceStatusStopped = "stopped"
//InstanceStatusSuspended suspended
InstanceStatusSuspended = "suspended"
InstanceStatusSuspended = "suspended"
//InstanceStatusTerminated terminated
InstanceStatusTerminated = "terminated"
//InstanceStatusCeased ceased
InstanceStatusCeased = "ceased"
InstanceStatusCeased = "ceased"

//LoadBalancerStatusPending pending
LoadBalancerStatusPending = "pending"
Expand All @@ -36,7 +36,8 @@ const (
//LoadBalancerStatusCeased ceased
LoadBalancerStatusCeased = "ceased"

defaultOpTimeout = 180*time.Second
defaultOpTimeout = 180 * time.Second
defaultWaitInterval = 5 * time.Second
)

// QingCloudClient QingCloud IaaS Advanced Client
Expand Down Expand Up @@ -66,10 +67,11 @@ func NewClient(config *config.Config, zone string) (QingCloudClient, error) {
}

c := &client{
InstanceService: instanceService,
JobService: jobService,
OperationTimeout: defaultOpTimeout,
zone: zone,
InstanceService: instanceService,
JobService: jobService,
OperationTimeout: defaultOpTimeout,
WaitInterval: defaultWaitInterval,
zone: zone,
}
return c, nil
}
Expand All @@ -78,7 +80,7 @@ type client struct {
InstanceService *service.InstanceService
JobService *service.JobService
OperationTimeout time.Duration
WaitInterval time.Duration
WaitInterval time.Duration
zone string
}

Expand Down

0 comments on commit d326815

Please sign in to comment.