provider

package
v2.2.0-beta.2+incompat... Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ListSep   = ","
	KeyValSep = "="
)

Separators for custom lists and maps: list: "val1,val2" map: "key1=val1,key2=val2"

View Source
const (
	TagCluster = "KubernetesCluster"
)

Provider specific tags:

Variables

This section is empty.

Functions

func ParseList

func ParseList(securityGroups string) []*string

func ParseMap

func ParseMap(tags string) map[string]string

Types

type Config

type Config map[string]string

type Machine

type Machine struct {
	ID                string    `json:"id"`
	Name              string    `json:"name"`
	Type              string    `json:"type"`
	CreationTimestamp time.Time `json:"creationTimestamp"`
	State             string    `json:"state"`
}

type MachineType

type MachineType struct {
	Name           string            `json:"name"`
	Memory         string            `json:"memory"`
	CPU            string            `json:"cpu"`
	MemoryResource resource.Quantity `json:"-"`
	CPUResource    resource.Quantity `json:"-"`
	PriceHour      float64           `json:"priceHour"`
	Description    string            `json:"description"`
}

TODO: split string and resource representation

func SortedMachineTypes

func SortedMachineTypes(mtypes []*MachineType) []*MachineType

type Provider

type Provider interface {
	Name() string
	ParseMachineID(providerID string) (string, error)
	GetMachine(ctx context.Context, id string) (*Machine, error)
	MachineTypes(ctx context.Context) ([]*MachineType, error)
	Machines(ctx context.Context) ([]*Machine, error)
	CreateMachine(ctx context.Context, name, mtype, clusterRole, userData string, config Config) (*Machine, error)
	DeleteMachine(ctx context.Context, id string) (*Machine, error)
}

Directories

Path Synopsis
aws
instancetypes
This file was generated by go generate; DO NOT EDIT
This file was generated by go generate; DO NOT EDIT

Jump to

Keyboard shortcuts

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