yaml

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DOCKER_ACCOUNT = "DOCKER_ACCOUNT"
View Source
const DOCKER_AUTH = "DOCKER_AUTH"
View Source
const DOCKER_EMAIL = "DOCKER_EMAIL"
View Source
const LIVE_MODE = "LIVE_MODE"

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

type Artifact struct {
	Project        string `yaml:"project"`
	Source         string `yaml:"source"`
	SourceApiToken string `yaml:"source-api-token"`
	BuildNumber    string `yaml:"build"`
	File           string `yaml:"file"`
	Platform       string `yaml:"platform"`
	// contains filtered or unexported fields
}

func (*Artifact) Execute

func (this *Artifact) Execute(c Context) error

func (*Artifact) Finish

func (this *Artifact) Finish(c Context) error

func (*Artifact) Prepare

func (this *Artifact) Prepare(c Context) error

func (*Artifact) Validate

func (this *Artifact) Validate(c Context) error

type ArtifactKey

type ArtifactKey string

type ByInstanceKey

type ByInstanceKey []*Instance

For sorting by instance key

func (ByInstanceKey) Len

func (a ByInstanceKey) Len() int

func (ByInstanceKey) Less

func (a ByInstanceKey) Less(i, j int) bool

func (ByInstanceKey) Swap

func (a ByInstanceKey) Swap(i, j int)

type CommaSeparatedList

type CommaSeparatedList string

type Container

type Container struct {
	ResourceRequirements *Requirement `yaml:"requires"`
	ImageRef             string       `yaml:"image"`
	Ssh                  []*string    `yaml:"ssh"`
	// contains filtered or unexported fields
}

func (*Container) Execute

func (this *Container) Execute(c Context) error

func (*Container) Finish

func (this *Container) Finish(c Context) error

func (*Container) InDesiredState

func (this *Container) InDesiredState(c Context) (bool, error)

func (*Container) Name

func (this *Container) Name() ContainerKey

func (*Container) Prepare

func (this *Container) Prepare(c Context) error

func (*Container) Validate

func (this *Container) Validate(c Context) error

type ContainerKey

type ContainerKey string

type Context

type Context map[string]interface{}

type Disk

type Disk struct {
	Cloud string           `yaml:"cloud"`
	Type  string           `yaml:"type"`
	Size  SizeQuantityUnit `yaml:"size"`
	// contains filtered or unexported fields
}

func (*Disk) Execute

func (this *Disk) Execute(c Context) error

func (*Disk) Finish

func (this *Disk) Finish(c Context) error

func (*Disk) InDesiredState

func (this *Disk) InDesiredState(c Context) (bool, error)

func (*Disk) Prepare

func (this *Disk) Prepare(c Context) error

func (*Disk) Validate

func (this *Disk) Validate(c Context) error

type DiskKey

type DiskKey string

type ExposedPort

type ExposedPort int

type Image

type Image struct {
	Dockerfile   string        `yaml:"dockerfile"`
	RepoId       string        `yaml:"image"`
	ArtifactKeys []ArtifactKey `yaml:"artifacts"`
	// contains filtered or unexported fields
}

func (*Image) Execute

func (this *Image) Execute(c Context) error

func (*Image) Finish

func (this *Image) Finish(c Context) error

func (*Image) InDesiredState

func (this *Image) InDesiredState(c Context) (bool, error)

func (*Image) Prepare

func (this *Image) Prepare(c Context) error

func (*Image) Validate

func (this *Image) Validate(c Context) error

type ImageKey

type ImageKey string

type Instance

type Instance struct {
	Resource       *Resource                              `yaml:"available"`
	Keypair        string                                 `yaml:"keypair"`
	User           string                                 `yaml:"user"`
	Cloud          string                                 `yaml:"cloud"`
	Project        string                                 `yaml:"project"`
	InternalIp     Ip                                     `yaml:"internal-ip"`
	ExternalIp     Ip                                     `yaml:"external-ip"`
	InstanceLabels InstanceLabelList                      `yaml:"labels"`
	VolumeSection  map[VolumeLabel]map[DiskKey]MountPoint `yaml:"volumes"`
	// contains filtered or unexported fields
}

func (*Instance) Execute

func (this *Instance) Execute(c Context) error

func (*Instance) Finish

func (this *Instance) Finish(c Context) error

func (*Instance) InDesiredState

func (this *Instance) InDesiredState(c Context) (bool, error)

func (*Instance) Prepare

func (this *Instance) Prepare(c Context) error

func (*Instance) Validate

func (this *Instance) Validate(c Context) error

type InstanceKey

type InstanceKey string

type InstanceLabel

type InstanceLabel string

type InstanceLabelList

type InstanceLabelList CommaSeparatedList

type Ip

type Ip string

type Job

type Job struct {
	ContainerKey   ContainerKey      `yaml:"container"`
	InstanceLabels InstanceLabelList `yaml:"instance-labels"`

	// Global resource requirements
	ResourceRequirements *Requirement `yaml:"requires"`
	// contains filtered or unexported fields
}

Job - has container, instance labels, and resource requirements

func (*Job) Execute

func (this *Job) Execute(c Context) error

func (*Job) Finish

func (this *Job) Finish(c Context) error

func (*Job) InDesiredState

func (this *Job) InDesiredState(c Context) (bool, error)

func (*Job) Name

func (this *Job) Name() JobKey

func (*Job) Prepare

func (this *Job) Prepare(c Context) error

func (*Job) Validate

func (this *Job) Validate(c Context) error

type JobKey

type JobKey string

type JobPortList

type JobPortList CommaSeparatedList

type MaestroDoc

type MaestroDoc struct {
	Imports        []YmlFilePath                           `yaml:"import"`
	Deploys        []ServiceKey                            `yaml:"deploy"`
	Vars           map[string]string                       `yaml:"var"`
	ServiceSection map[ServiceKey][]map[JobKey]JobPortList `yaml:"service"`
	Artifacts      map[ArtifactKey]*Artifact               `yaml:"artifact"`
	Images         map[ImageKey]*Image                     `yaml:"image"`
	Containers     map[ContainerKey]*Container             `yaml:"container"`
	Disks          map[DiskKey]*Disk                       `yaml:"disk"`
	Instances      map[InstanceKey]*Instance               `yaml:"instance"`
	Jobs           map[JobKey]*Job                         `yaml:"job"`
	// contains filtered or unexported fields
}

func (*MaestroDoc) Apply

func (this *MaestroDoc) Apply() error

func (*MaestroDoc) LoadFromBytes

func (this *MaestroDoc) LoadFromBytes(buff []byte) error

func (*MaestroDoc) LoadFromFile

func (this *MaestroDoc) LoadFromFile(filename string) error

func (*MaestroDoc) String

func (this *MaestroDoc) String() string

func (*MaestroDoc) Validate

func (this *MaestroDoc) Validate(c Context) error

type MountPoint

type MountPoint string

type Regexp

type Regexp struct {
	*regexp.Regexp
}
var SizeQuantityUnitRegex *Regexp

func (*Regexp) Parse

func (r *Regexp) Parse(s string) map[string]string

type Requirement

type Requirement Resource

type Resource

type Resource struct {
	CPU    int              `yaml:"cpu"`
	Memory SizeQuantityUnit `yaml:"memory"`
	Disk   SizeQuantityUnit `yaml:"disk"`
}

type Runnable

type Runnable interface {
	Validate(c Context) error
	Prepare(c Context) error
	Execute(c Context) error
	Finish(c Context) error
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func (*Service) Execute

func (this *Service) Execute(c Context) error

func (*Service) Finish

func (this *Service) Finish(c Context) error

func (*Service) InDesiredState

func (this *Service) InDesiredState(c Context) (bool, error)

func (*Service) Name

func (this *Service) Name() ServiceKey

func (*Service) Prepare

func (this *Service) Prepare(c Context) error

func (*Service) Targets

func (this *Service) Targets() [][]*Container

func (*Service) Validate

func (this *Service) Validate(c Context) error

type ServiceKey

type ServiceKey string

type SizeQuantityUnit

type SizeQuantityUnit string
const (
	TbFormat SizeQuantityUnit = "%dT"
	GbFormat SizeQuantityUnit = "%dG"
	MbFormat SizeQuantityUnit = "%dM"
	KbFormat SizeQuantityUnit = "%dK"
)

func (SizeQuantityUnit) ToUnit

func (this SizeQuantityUnit) ToUnit(su SizeUnit) float64

func (SizeQuantityUnit) Validate

func (this SizeQuantityUnit) Validate() error

type SizeUnit

type SizeUnit int64
const (
	KB SizeUnit = kb
	MB SizeUnit = mb
	GB SizeUnit = gb
	TB SizeUnit = tb
)

type Verifiable

type Verifiable interface {
	InDesiredState(c Context) (bool, error)
}

type Volume

type Volume struct {
	Disk       DiskKey
	MountPoint string
	// contains filtered or unexported fields
}

type VolumeLabel

type VolumeLabel string

type YmlFilePath

type YmlFilePath string

Jump to

Keyboard shortcuts

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