tooling

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerLogin added in v0.2.8

func DockerLogin(pass, user, registry string) (err error)

DockerLogin uses a docker client to login to metahub

func GetSSMPassword added in v0.2.6

func GetSSMPassword(region, path string) (passwd string, err error)

GetSSMPassword fetches the metahub password from SSM

Types

type Config

type Config struct {
	//TODO:  Password should be a hash
	User     string        `yaml:"user"`
	Password string        `yaml:"password"`
	Types    []MachineType `yaml:"types"`
}

Config holds a list of MachineTypes

func CreateConfigFromFile

func CreateConfigFromFile(fpath string) (cfg Config, err error)

CreateConfigFromFile parses a file and returns a workshop

func ParseConfig

func ParseConfig(data []byte) (cfg Config, err error)

ParseConfig takes a bytearray and unmarshals it

type EC2Meta added in v0.2.6

type EC2Meta struct {
	InstanceType   string
	InstanceSize   string
	HyperThreading string
}

EC2Meta holds the infos for the instance

func GetMetaData added in v0.2.6

func GetMetaData() (md EC2Meta, err error)

GetMetaData fetches the metadata of an instance

func (*EC2Meta) GetMetahubFeatures added in v0.2.6

func (md *EC2Meta) GetMetahubFeatures() []string

GetMetahubFeatures returns the features

func (*EC2Meta) GetMetahubTypename added in v0.2.6

func (md *EC2Meta) GetMetahubTypename(tname string) string

GetMetahubTypename returns the typename to login to metahub

type MachineType

type MachineType struct {
	DisplayName string   `yaml:"name"`
	Features    []string `yaml:"features"`
}

MachineType stores the name and the list of features

Jump to

Keyboard shortcuts

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