Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions v1/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
type CloudInstanceReader interface {
GetInstance(ctx context.Context, id CloudProviderInstanceID) (*Instance, error)
ListInstances(ctx context.Context, args ListInstancesArgs) ([]Instance, error)
GetInstancePollTime() time.Duration
}

type CloudCreateTerminateInstance interface {
Expand Down
5 changes: 5 additions & 0 deletions v1/notimplemented.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ func (c notImplCloudClient) GetInstanceTypePollTime() time.Duration {
return pollTime
}

func (c notImplCloudClient) GetInstancePollTime() time.Duration {
pollTime := 5 * time.Second
return pollTime
}

func (c notImplCloudClient) CreateInstance(_ context.Context, _ CreateInstanceAttrs) (*Instance, error) {
return nil, ErrNotImplemented
}
Expand Down
4 changes: 4 additions & 0 deletions v1/waiters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ func (m *mockCloudInstanceReader) ListInstances(_ context.Context, _ ListInstanc
return nil, nil
}

func (m *mockCloudInstanceReader) GetInstancePollTime() time.Duration {
return 5 * time.Second
}

// setStatusSequence sets up a sequence of statuses that will be returned for an instance
func (m *mockCloudInstanceReader) setStatusSequence(instanceID CloudProviderInstanceID, sequence []LifecycleStatus) {
m.statusSequence[instanceID] = sequence
Expand Down
Loading