Documentation ¶
Index ¶
Constants ¶
View Source
const (
FirstInstance = "0"
)
View Source
const FirstPhaseName = "init"
Variables ¶
View Source
var (
ErrNoFreeIP = errors.New("out of ip address to allocate")
)
View Source
var (
ErrSystemNotFound = errors.New("system not found")
)
View Source
var (
ErrTestsDontMatchDist = fmt.Errorf("dists does not match the tests")
)
Functions ¶
Types ¶
type Commands ¶
type Commands interface { Interpret(spec schema.RootSchema, dists []*entity.ResourceDist) ([]entity.TestCommands, error) Env(spec schema.RootSchema, dists []*entity.ResourceDist) ([]map[string]string, error) }
func NewCommands ¶
func NewCommands(calc TestCalculator) Commands
type Dependency ¶
type Dependency interface { AttachNetworks(bucket int, state *entity.State, container string, networks []schema.Network) ([]command.Command, error) //Container returns create, start, error Container(bucket int, state *entity.State, service entity.Service, segment *entity.Segment) (command.Command, command.Command, error) DetachNetworks(bucket int, container string, networks []schema.Network) ([]command.Command, error) Emulation(bucket int, container string, networks []schema.Network) ([]command.Command, error) Files(bucket int, service entity.Service) ([]command.Command, error) RemoveContainer(bucket int, name string) (command.Command, error) Sidecars(bucket int, segment *entity.Segment, state *entity.State, service entity.Service, sidecars []schema.Sidecar) ([][]command.Command, error) SidecarNetwork(bucket int, state *entity.State, service entity.Service) (command.Command, error) Volumes(bucket int, service entity.Service) ([]command.Command, error) }
func NewDependency ¶
func NewDependency( cmdMaker maker.Command, parser maker.Service, log logrus.Ext1FieldLogger) Dependency
type Resolve ¶
type Resolve interface { CreateNetworks(state *entity.State, networks []schema.Network, meta map[string]string) ([]command.Command, error) CreateSystemNetworks(state *entity.State, systems []schema.SystemComponent) ([]command.Command, error) CreateServices(state *entity.State, spec schema.RootSchema, dist entity.PhaseDist, services []entity.Service) ([][]command.Command, error) RemoveServices(dist entity.PhaseDist, services []entity.Service) ([][]command.Command, error) UpdateServices(state *entity.State, dist entity.PhaseDist, services []entity.ServiceDiff) ([][]command.Command, error) PhaseTransition(state *entity.State, dist entity.PhaseDist, phase schema.Phase) ([][]command.Command, error) }
func NewResolve ¶
func NewResolve( cmdMaker maker.Command, deps Dependency, log logrus.Ext1FieldLogger) Resolve
type System ¶
type System interface { GetAlreadyExists(state *entity.State, systems []schema.SystemComponent) ( []schema.SystemComponent, []schema.SystemComponent, bool) UpdateChanged(state *entity.State, spec schema.RootSchema, systems []schema.SystemComponent) (*entity.SystemDiff, error) // Add modifies State Add(state *entity.State, spec schema.RootSchema, systems []schema.SystemComponent) ([]entity.Service, error) // Remove modifies state Remove(state *entity.State, spec schema.RootSchema, systems []string) ([]entity.Service, error) Tasks(state *entity.State, spec schema.RootSchema, tasks []schema.Task) ([]entity.Service, error) }
System is for diff calculations
type TestCalculator ¶
type TestCalculator interface { Commands(spec schema.RootSchema, dist *entity.ResourceDist, index int) (entity.TestCommands, error) Env(spec schema.RootSchema, dist *entity.ResourceDist, index int) (map[string]string, error) }
func NewTestCalculator ¶
func NewTestCalculator( conf config.Config, sys System, resolver Resolve, log logrus.Ext1FieldLogger) TestCalculator
Click to show internal directories.
Click to hide internal directories.