variant

package
v1.32.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsVariantNode

func IsVariantNode(instanceID string) bool

IsVariantNode helps evaluate if a specific variant handles a given instance

func NodeType

func NodeType(instanceID string) string

NodeType returns the type name example: "fargate"

func RegisterVariant

func RegisterVariant(name string, variant Variant)

RegisterVariant is used to register code that needs to be called for a specific variant

Types

type Variant

type Variant interface {
	Initialize(cloudConfig *config.CloudConfig, credentials *credentials.Credentials,
		provider config.SDKProvider, ec2API iface.EC2, region string) error
	IsSupportedNode(nodeName string) bool
	NodeAddresses(instanceID, vpcID string) ([]v1.NodeAddress, error)
	GetZone(instanceID, vpcID, region string) (cloudprovider.Zone, error)
	InstanceExists(instanceID, vpcID string) (bool, error)
	InstanceShutdown(instanceID, vpcID string) (bool, error)
	InstanceTypeByProviderID(id string) (string, error)
}

Variant is a slightly different type of node

func GetVariant

func GetVariant(instanceID string) Variant

GetVariant returns the interface that can then be used to handle a specific instance

func GetVariants

func GetVariants() []Variant

GetVariants returns the names of all the variants registered

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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