core

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Template added in v0.2.0

func Template(name string, input map[string]string, k8s *kube.K8s) ([]byte, error)

Template reads a file and renders it according to the provided functions

Types

type Depends

type Depends map[string]*sync.WaitGroup

Depends implements a mapped waitgroup for dependencies

func (Depends) Complete

func (d Depends) Complete(stages ...string)

Complete given waitgroups

func (Depends) Wait

func (d Depends) Wait(stages ...string)

Wait on given waitgroups

type Jobs

type Jobs struct {
	Before []string `yaml:"before"`
	After  []string `yaml:"after"`
}

Jobs represent any shell scripts

type Resource added in v0.2.0

type Resource interface {
	Lint(string, *util.Values) error
	Status() (bool, error)
	Install() error
	Upgrade() error
	Delete() error
	Connect(interface{})
	SetInput([]byte)
}

Resource is the thing to be created / destroyed

type Stage

type Stage struct {
	Depends  []string    `yaml:"depends"`  // dependencies
	Forget   bool        `yaml:"forget"`   // install only
	Input    string      `yaml:"input"`    // template file
	Jobs     Jobs        `yaml:"jobs"`     // bash jobs
	Kind     string      `yaml:"kind"`     // type of deploy
	Remove   bool        `yaml:"remove"`   // delete instead
	Requires util.Values `yaml:"requires"` // env requirements
	Values   util.Values `yaml:"values"`   // additional values
	Resource
	*kube.K8s
}

Stage represents a single part of the deployment pipeline

func (*Stage) Backward added in v0.2.0

func (stg *Stage) Backward(key string, global util.Values, deps *Depends, force, verbose bool) error

Backward pass over the graph

func (*Stage) Forward added in v0.2.0

func (stg *Stage) Forward(key string, global util.Values, deps *Depends, force, verbose bool) error

Forward pass over the graph

func (*Stage) UnmarshalYAML added in v0.2.0

func (stg *Stage) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML allows us to determine the type of our resource

type Stages added in v0.2.0

type Stages map[string]*Stage

Stages represents the complete workflow.

func (*Stages) BuildDepends added in v0.2.0

func (stg *Stages) BuildDepends(reverse bool) *Depends

BuildDepends generates a dependency map

func (*Stages) Connect added in v0.2.0

func (stg *Stages) Connect(tillerName, tillerPort string) (func(string, util.Values) ([]byte, error), func())

Connect links all of our stages to their required resources

func (*Stages) Destroy added in v0.2.0

func (stg *Stages) Destroy(input util.Values, force, verbose bool)

Destroy deletes each stage in reverse order

func (*Stages) Lint added in v0.2.0

func (stg *Stages) Lint(in util.Values) (err error)

Lint all the stages in our pipeline

func (*Stages) Run added in v0.2.0

func (stg *Stages) Run(input util.Values, force, verbose bool)

Run processes each stage in the pipeline

func (*Stages) Until added in v0.2.0

func (stg *Stages) Until(input util.Values, force, verbose bool, target string)

Until creates single resource and dependencies

Jump to

Keyboard shortcuts

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