steps

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFuncNotImplemented    = errors.New("Function not implemented")
	ErrStepFailed            = errors.New("step failed")
	ErrStepDependencyFailure = errors.New("step dependency failure")
	ErrStepInvalid           = errors.New("step invalid")
)
View Source
var (
	ErrTaskDefNotCreated = errors.New("Task definition was not created")
)

Functions

This section is empty.

Types

type CreateFunc

type CreateFunc func(*config.Context, *Step, *StepMetadata) (OutputFields, error)

type DeleteFunc

type DeleteFunc func(*config.Context, *Step, *StepMetadata) (OutputFields, error)

type DifferFunc

type DifferFunc func(*config.Context, *Step, *StepMetadata) (any, error)

type OutputFields

type OutputFields map[string]interface{}

type PreApplyFunc

type PreApplyFunc func(*config.Context, *Step, *StepMetadata) error

type ReadFunc

type ReadFunc func(*config.Context, *Step, *StepMetadata) (any, error)

type Step

type Step struct {
	Label string
	ID    string

	Parent *Step

	Create CreateFunc
	Read   ReadFunc
	Update UpdateFunc

	// NOT IMPLEMENTED YET
	Delete DeleteFunc

	// This runs immediately before Apply and can be used to add dependencies
	PreApply PreApplyFunc

	ParallelDeps bool

	// this step does no "work", it only has descendants
	IsNoOp bool

	Attributes map[string]interface{}

	Outputs map[interface{}]OutputFields

	OutputFields OutputFields

	Dependencies []*Step

	Resource interface{}

	ExistingResource interface{}

	Logger *log.Entry
	// contains filtered or unexported fields
}

func CleanupCronjobsStep

func CleanupCronjobsStep(resource *config.KeepInSync) *Step

func CleanupOnlyStep

func CleanupOnlyStep(project *config.Project) *Step

func CleanupServicesStep

func CleanupServicesStep(resource *config.KeepInSync) *Step

func CleanupStep

func CleanupStep(resource *config.KeepInSync) *Step

func CleanupTaskDefinitionsStep

func CleanupTaskDefinitionsStep(resource *config.KeepInSync) *Step

func ConsoleTaskStep

func ConsoleTaskStep(resource *config.ConsoleTask) *Step

func CronDeploymentStep

func CronDeploymentStep(resource *config.Project) *Step

func CronRuleStep

func CronRuleStep(resource *config.CronJob) *Step

func CronSchedulesStep added in v0.1.0

func CronSchedulesStep(resource *config.Project) *Step

func CronTargetStep

func CronTargetStep(resource *config.CronJob) *Step

func CronjobStep

func CronjobStep(resource *config.CronJob, useOldEventbridgeStyle bool) *Step

func DeploymentStep

func DeploymentStep(project *config.Project) *Step

Primary deployment step when user requests 'deploy'

func DeregisterTaskDefinitionsStep

func DeregisterTaskDefinitionsStep(resource *config.Project) *Step

func FirelensStep

func FirelensStep(resource *config.Project) *Step

func LogGroupStep

func LogGroupStep(resource interface{}) *Step

func NewStep

func NewStep(step *Step) *Step

func NoopStep

func NoopStep() *Step

Step that does no work at all. It's used to skip other steps (returned in their constructor)

func PreDeployTaskStep

func PreDeployTaskStep(resource *config.PreDeployTask) *Step

func PreDeploymentStep

func PreDeploymentStep(resource *config.Project) *Step

func PreflightStep

func PreflightStep(project *config.Project) *Step

Run some preflight checks to make sure we can even deploy this thing

func PreloadLogGroupsStep

func PreloadLogGroupsStep(project *config.Project) *Step

func PreloadSecretsStep

func PreloadSecretsStep(project *config.Project) *Step

func PreloadStep

func PreloadStep(project *config.Project) *Step

func ScheduleGroupStep added in v0.1.0

func ScheduleGroupStep(resource *config.Project) *Step

func ServiceDeploymentStep

func ServiceDeploymentStep(project *config.Project) *Step

func ServiceStep

func ServiceStep(resource *config.Service) *Step

func TaskDefinitionStep

func TaskDefinitionStep(resource config.IsTaskStruct) *Step

func (*Step) Applied

func (s *Step) Applied() bool

func (*Step) Apply

func (s *Step) Apply(ctx *config.Context) error

func (*Step) FindAllChildren

func (s *Step) FindAllChildren(label *string) []*Step

find all children that have a specific label. Or all children if the label is nil

func (*Step) GetAttr

func (s *Step) GetAttr(key string) (interface{}, bool)

func (*Step) GetAttrMust added in v0.1.0

func (s *Step) GetAttrMust(key string) interface{}

func (*Step) Identifier

func (s *Step) Identifier() string

func (*Step) Indent

func (s *Step) Indent()

func (*Step) Log

func (s *Step) Log() *log.Entry

func (*Step) LookupOutput

func (s *Step) LookupOutput(key string) (interface{}, bool)

func (*Step) MarkApplied

func (s *Step) MarkApplied()

func (*Step) Name

func (s *Step) Name() string

func (*Step) Outdent

func (s *Step) Outdent()

func (*Step) SearchAttr

func (s *Step) SearchAttr(key string) (interface{}, bool)

looks in this step and any children

func (*Step) SetAttr

func (s *Step) SetAttr(key string, value interface{})

func (*Step) Validate

func (s *Step) Validate() error

type StepMetadata

type StepMetadata struct {
}

Passed to the CRUD functions

type UpdateFunc

type UpdateFunc func(*config.Context, *Step, *StepMetadata) (OutputFields, error)

Jump to

Keyboard shortcuts

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