provision

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitProviderWith

func InitProviderWith(config *config.IgniteConfig)

func Register

func Register(factory ProviderFactory)

Types

type Host

type Host struct {
	Name string
}

type Provider

type Provider interface {
	Start(*Unit) error
	Stop(*Unit) error
	Reset(*Unit) error
	Suspend(*Unit) error
	Pause(*Unit) error
	Unpause(*Unit) error
}

func FindProviderByName

func FindProviderByName(name string) Provider

type ProviderConfig

type ProviderConfig interface {
	Name() string
	Description() string
	RootDir() string
	Feature(string) string
}

type ProviderFactory

type ProviderFactory interface {
	Name() string
	NewProvider(ProviderConfig) Provider
}

type Staging

type Staging struct {
	Fallback        bool
	DefaultProvider string
	Tiers           map[string]*Tier
	Workspaces      map[string]*Workspace
	// contains filtered or unexported fields
}

func DefaultStaging

func DefaultStaging() *Staging

func StagingFrom

func StagingFrom(config *config.IgniteConfig) *Staging

func (*Staging) Pause added in v0.3.0

func (s *Staging) Pause(workspace string, tier string) error

func (*Staging) Reset

func (s *Staging) Reset(workspace string, tier string) error

func (*Staging) SshTier added in v0.2.0

func (s *Staging) SshTier(userName string, tierName string, sshPort int16) error

func (*Staging) Start

func (s *Staging) Start(workspace string, tier string) error

func (*Staging) Stop

func (s *Staging) Stop(workspace string, tier string) error

func (*Staging) Suspend

func (s *Staging) Suspend(workspace string, tier string) error

func (*Staging) TiersInfo added in v0.4.0

func (s *Staging) TiersInfo(workspace string) error

func (*Staging) UnitsInfo added in v0.3.0

func (s *Staging) UnitsInfo() error

func (*Staging) Unpause added in v0.3.0

func (s *Staging) Unpause(workspace string, tier string) error

func (*Staging) WorkspacesInfo added in v0.3.0

func (s *Staging) WorkspacesInfo() error

type StateMsg

type StateMsg struct {
	State TierState
	Tier  *Tier
	Error error
}

type Tier

type Tier struct {
	*Unit
	Inactive bool
	Parents  map[string]TierState
	Children map[string]TierState
}

func (*Tier) ActiveState added in v0.4.0

func (t *Tier) ActiveState() string

func (*Tier) IsChildrenDone

func (t *Tier) IsChildrenDone() bool

func (*Tier) IsParentsDone

func (t *Tier) IsParentsDone() bool

func (*Tier) SetChildState

func (t *Tier) SetChildState(name string, state TierState)

func (*Tier) SetParentState

func (t *Tier) SetParentState(name string, state TierState)

type TierState

type TierState = int8
const (
	TierStateUnknown TierState = iota
	TierStateDone
	TierStateFailed
	TierStateInactive
)

type Unit

type Unit struct {
	Description string
	Name        string
	Provider    string
	Path        string
	Hosts       []Host
}

func (*Unit) Pause added in v0.3.0

func (t *Unit) Pause() error

func (*Unit) Reset

func (t *Unit) Reset() error

func (*Unit) Ssh added in v0.2.0

func (t *Unit) Ssh(user string, port int16) error

func (*Unit) Start

func (t *Unit) Start() error

func (*Unit) Stop

func (t *Unit) Stop() error

func (*Unit) Suspend

func (t *Unit) Suspend() error

func (*Unit) Unpause added in v0.3.0

func (t *Unit) Unpause() error

type Workspace

type Workspace struct {
	Description string
	Name        string
	Tiers       map[string]*Tier
}

Jump to

Keyboard shortcuts

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