asyncnodegroups

package
v0.0.0-...-2d37aee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsyncNodeGroupStateChecker

type AsyncNodeGroupStateChecker interface {
	// IsUpcoming checks if the node group is being asynchronously created, is scheduled to be
	// asynchronously created or is being initiated after asynchronous creation. Upcoming node groups
	// are reported as non-existing by the NodeGroup.Exist method, but are listed by the cloud provider.
	// Upcoming node group may be scaled up or down, if cloud provider supports in-memory accounting.
	// When cloud provider does not support asynchronous node group creation,
	// method always return false.
	IsUpcoming(nodeGroup cloudprovider.NodeGroup) bool

	CleanUp()
}

AsyncNodeGroupStateChecker is responsible for checking the state of a node group

func NewDefaultAsyncNodeGroupStateChecker

func NewDefaultAsyncNodeGroupStateChecker() AsyncNodeGroupStateChecker

NewDefaultAsyncNodeGroupStateChecker creates an instance of AsyncNodeGroupStateChecker.

type MockAsyncNodeGroupStateChecker

type MockAsyncNodeGroupStateChecker struct {
	IsUpcomingNodeGroup map[string]bool
}

MockAsyncNodeGroupStateChecker is a mock AsyncNodeGroupStateChecker to be used in tests

func (*MockAsyncNodeGroupStateChecker) CleanUp

func (p *MockAsyncNodeGroupStateChecker) CleanUp()

CleanUp doesn't do anything; it's here to satisfy the interface

func (*MockAsyncNodeGroupStateChecker) IsUpcoming

IsUpcoming simulates checking if node group is upcoming.

type NoOpAsyncNodeGroupStateChecker

type NoOpAsyncNodeGroupStateChecker struct {
}

NoOpAsyncNodeGroupStateChecker is a no-op implementation of AsyncNodeGroupStateChecker.

func (*NoOpAsyncNodeGroupStateChecker) CleanUp

func (*NoOpAsyncNodeGroupStateChecker) CleanUp()

CleanUp cleans up internal structures.

func (*NoOpAsyncNodeGroupStateChecker) IsUpcoming

IsUpcoming returns false by default

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL