core

package
v0.21.3 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPool

func NewPool(poolName string, groups []EnsuredGroup, svc MachinesService) infra.Pool

func Validate

func Validate(lbs map[string]*infra.Ingress, pools []string) error

Types

type Cleanupper

type Cleanupper interface {
	AllExisting() ([]string, error)
	Delete(id string) error
}

type EnsuredGroup

type EnsuredGroup interface {
	EnsureMembers(machine []infra.Machine) error
	AddMember(machine infra.Machine) error
}

type Executor

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

func NewExecutor

func NewExecutor(listersInCleanupOrder [][]Cleanupper) *Executor

NewExecutor - inner cleanuppers are executed concurrently,

cleanupper slices are executed sequentially

func (*Executor) Plan

func (e *Executor) Plan(root *Resource) error

func (*Executor) Run

func (e *Executor) Run() (chan error, error)

type MachinesService

type MachinesService interface {
	ListPools() ([]string, error)
	List(poolName string, active bool) (infra.Machines, error)
	Create(poolName string) (infra.Machine, error)
}

type Resource

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

func (*Resource) ID

func (i *Resource) ID() (*string, error)

type ResourceFactory

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

func NewResourceFactory

func NewResourceFactory(monitor mntr.Monitor, operatorID string) *ResourceFactory

func (*ResourceFactory) IsOperatorManaged

func (i *ResourceFactory) IsOperatorManaged(id *string) bool

func (*ResourceFactory) New

func (i *ResourceFactory) New(service ResourceService, payload interface{}, dependencies []*Resource, ensured func(interface{}) error) *Resource

type ResourceService

type ResourceService interface {
	// Neighter include dependencies nor an ID in interface{}
	Abbreviate() string
	Desire(payload interface{}) (interface{}, error)
	Ensure(id string, desired interface{}, ensuredDependencies []interface{}) (interface{}, error)
	Cleanupper
}

Jump to

Keyboard shortcuts

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