engine

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAwsConfig

func CreateAwsConfig() aws.Config

func ListEngines

func ListEngines() []string

func RegisterDeploymentEngine

func RegisterDeploymentEngine(id string, engineConstructor func(config aws.Config) DeploymentEngine)

Types

type BaseDeploymentConfig

type BaseDeploymentConfig struct {
	Id_                string   `mapstructure:"id"`
	Type_              string   `mapstructure:"type"`
	Version_           string   `mapstructure:"version"`
	PreDeployCommand_  []string `mapstructure:"pre-deploy-command,omitempty"`
	PostDeployCommand_ []string `mapstructure:"post-deploy-command,omitempty"`
}

func (BaseDeploymentConfig) Id

func (BaseDeploymentConfig) PostDeployCommand

func (d BaseDeploymentConfig) PostDeployCommand() []string

func (BaseDeploymentConfig) PreDeployCommand added in v0.2.3

func (d BaseDeploymentConfig) PreDeployCommand() []string

func (*BaseDeploymentConfig) SetVersion added in v0.2.0

func (d *BaseDeploymentConfig) SetVersion(version string)

func (BaseDeploymentConfig) Type

func (d BaseDeploymentConfig) Type() string

func (BaseDeploymentConfig) Version

func (d BaseDeploymentConfig) Version() string

type Deployment

type Deployment interface {
	Id() string
	Type() string
	Version() string
	PreDeployCommand() []string
	PostDeployCommand() []string
	SetVersion(version string)
}

type DeploymentEngine

type DeploymentEngine interface {
	Type() string
	ResolveConfigStruct() Deployment
	Deploy(deploymentConfig Deployment, printer func(string, ...any)) error
	CheckVersion(deploymentConfig Deployment) (string, error)
}

func GetEngine

func GetEngine(id string) (DeploymentEngine, error)

type ECSDeploymentEngine

type ECSDeploymentEngine struct {
	ECSClient *ecs.Client
}

func (*ECSDeploymentEngine) CheckVersion

func (engine *ECSDeploymentEngine) CheckVersion(config Deployment) (string, error)

func (*ECSDeploymentEngine) Deploy

func (engine *ECSDeploymentEngine) Deploy(config Deployment, p func(string, ...any)) error

func (*ECSDeploymentEngine) ResolveConfigStruct

func (engine *ECSDeploymentEngine) ResolveConfigStruct() Deployment

func (*ECSDeploymentEngine) Type

func (engine *ECSDeploymentEngine) Type() string

type EcsDeployment

type EcsDeployment struct {
	BaseDeploymentConfig    `mapstructure:",squash"`
	Cluster                 string `mapstructure:"cluster"`
	VersionEnvironmentKey   string `mapstructure:"version-environment-key,omitempty"`
	WaitForServiceStability bool   `mapstructure:"wait-for-service-stability,omitempty"`
	WaitForMinutes          int    `mapstructure:"wait-for-minutes,omitempty"`
	ForceNewDeployment      bool   `mapstructure:"force-new-deployment,omitempty"`
}

type LambdaDeployment

type LambdaDeployment struct {
	BaseDeploymentConfig  `mapstructure:",squash"`
	VersionEnvironmentKey string `mapstructure:"version-environment-key,omitempty"`
	Bucket                string `mapstructure:"bucket,omitempty"`
	KeyTemplate           string `mapstructure:"key,omitempty"`
	VersionTag            string `mapstructure:"version-tag,omitempty"`
}

type LambdaDeploymentEngine

type LambdaDeploymentEngine struct {
	LambdaClient *lambda.Client
}

func (*LambdaDeploymentEngine) CheckVersion

func (engine *LambdaDeploymentEngine) CheckVersion(config Deployment) (string, error)

func (*LambdaDeploymentEngine) Deploy

func (engine *LambdaDeploymentEngine) Deploy(config Deployment, p func(string, ...any)) error

func (*LambdaDeploymentEngine) ResolveConfigStruct

func (engine *LambdaDeploymentEngine) ResolveConfigStruct() Deployment

func (*LambdaDeploymentEngine) Type

func (engine *LambdaDeploymentEngine) Type() string

Jump to

Keyboard shortcuts

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