Documentation ¶
Index ¶
- func Ask(prompt string) string
- func AskBool(prompt string) bool
- func RunLocalDeploy(ctx context.Context, templateStore deployer.TemplateStore, infraAdapter IInfra, ...) error
- type EventLoop
- type IInfra
- type InfraAdapter
- func (cf *InfraAdapter) CleanupPostgresDatabase(ctx context.Context, msg *deployer_tpb.CleanupPostgresDatabaseMessage) (*deployer_tpb.PostgresDatabaseStatusMessage, error)
- func (cf *InfraAdapter) CreateChangeSet(ctx context.Context, msg *deployer_tpb.CreateChangeSetMessage) (*deployer_tpb.ChangeSetStatusChangedMessage, error)
- func (cf *InfraAdapter) CreateNewStack(ctx context.Context, msg *deployer_tpb.CreateNewStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
- func (cf *InfraAdapter) HandleMessage(ctx context.Context, msg proto.Message) (*deployer_pb.DeploymentPSMEventSpec, error)
- func (cf *InfraAdapter) MigratePostgresDatabase(ctx context.Context, msg *deployer_tpb.MigratePostgresDatabaseMessage) (*deployer_tpb.PostgresDatabaseStatusMessage, error)
- func (cf *InfraAdapter) PollStack(ctx context.Context, stackName string) (*deployer_tpb.StackStatusChangedMessage, error)
- func (cf *InfraAdapter) ScaleStack(ctx context.Context, msg *deployer_tpb.ScaleStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
- func (cf *InfraAdapter) StabalizeStack(ctx context.Context, msg *deployer_tpb.StabalizeStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
- func (cf *InfraAdapter) UpdateStack(ctx context.Context, msg *deployer_tpb.UpdateStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
- func (cf *InfraAdapter) UpsertPostgresDatabase(ctx context.Context, msg *deployer_tpb.UpsertPostgresDatabaseMessage) (*deployer_tpb.PostgresDatabaseStatusMessage, error)
- type Spec
- type StateStore
- type TransitionData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunLocalDeploy ¶
Types ¶
type EventLoop ¶
type EventLoop struct {
// contains filtered or unexported fields
}
EventLoop emulates AWS infrastructure by running all handlers in the same process. Used when running as a standalone tool, e.g. when bootstrapping a new environment.
func NewEventLoop ¶
func NewEventLoop(awsRunner IInfra, stateStore *StateStore, specBuilder *deployer.SpecBuilder) *EventLoop
func (*EventLoop) Run ¶
func (lel *EventLoop) Run(ctx context.Context, trigger *deployer_tpb.RequestDeploymentMessage, cluster *environment_pb.Cluster, environment *environment_pb.Environment) error
type IInfra ¶
type IInfra interface {
HandleMessage(ctx context.Context, msg proto.Message) (*deployer_pb.DeploymentPSMEventSpec, error)
}
type InfraAdapter ¶
type InfraAdapter struct {
// contains filtered or unexported fields
}
func NewInfraAdapter ¶
func NewInfraAdapter(ctx context.Context, cl *awsinfra.DeployerClients) (*InfraAdapter, error)
func (*InfraAdapter) CleanupPostgresDatabase ¶
func (cf *InfraAdapter) CleanupPostgresDatabase(ctx context.Context, msg *deployer_tpb.CleanupPostgresDatabaseMessage) (*deployer_tpb.PostgresDatabaseStatusMessage, error)
func (*InfraAdapter) CreateChangeSet ¶
func (cf *InfraAdapter) CreateChangeSet(ctx context.Context, msg *deployer_tpb.CreateChangeSetMessage) (*deployer_tpb.ChangeSetStatusChangedMessage, error)
func (*InfraAdapter) CreateNewStack ¶
func (cf *InfraAdapter) CreateNewStack(ctx context.Context, msg *deployer_tpb.CreateNewStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
func (*InfraAdapter) HandleMessage ¶
func (cf *InfraAdapter) HandleMessage(ctx context.Context, msg proto.Message) (*deployer_pb.DeploymentPSMEventSpec, error)
func (*InfraAdapter) MigratePostgresDatabase ¶
func (cf *InfraAdapter) MigratePostgresDatabase(ctx context.Context, msg *deployer_tpb.MigratePostgresDatabaseMessage) (*deployer_tpb.PostgresDatabaseStatusMessage, error)
func (*InfraAdapter) PollStack ¶
func (cf *InfraAdapter) PollStack( ctx context.Context, stackName string, ) (*deployer_tpb.StackStatusChangedMessage, error)
func (*InfraAdapter) ScaleStack ¶
func (cf *InfraAdapter) ScaleStack(ctx context.Context, msg *deployer_tpb.ScaleStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
func (*InfraAdapter) StabalizeStack ¶
func (cf *InfraAdapter) StabalizeStack(ctx context.Context, msg *deployer_tpb.StabalizeStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
func (*InfraAdapter) UpdateStack ¶
func (cf *InfraAdapter) UpdateStack(ctx context.Context, msg *deployer_tpb.UpdateStackMessage) (*deployer_tpb.StackStatusChangedMessage, error)
func (*InfraAdapter) UpsertPostgresDatabase ¶
func (cf *InfraAdapter) UpsertPostgresDatabase(ctx context.Context, msg *deployer_tpb.UpsertPostgresDatabaseMessage) (*deployer_tpb.PostgresDatabaseStatusMessage, error)
type Spec ¶
type Spec struct { Version string AppConfig *application_pb.Application ClusterConfig *environment_pb.Cluster EnvConfig *environment_pb.Environment ScratchBucket string Flags *deployer_pb.DeploymentFlags ConfirmPlan bool }
type StateStore ¶
type StateStore struct { StoreCallback func(ctx context.Context, state *deployer_pb.DeploymentState, event *deployer_pb.DeploymentEvent) error // contains filtered or unexported fields }
StateStore wires back the events to the deployer, rather than relying on an event bus and database
func NewStateStore ¶
func NewStateStore() *StateStore
func (*StateStore) GetDeployment ¶
func (lss *StateStore) GetDeployment(ctx context.Context, id string) (*deployer_pb.DeploymentState, error)
func (*StateStore) StoreDeploymentEvent ¶
func (lss *StateStore) StoreDeploymentEvent(ctx context.Context, state *deployer_pb.DeploymentState, event *deployer_pb.DeploymentEvent) error
type TransitionData ¶
type TransitionData struct { CausedBy *deployer_pb.DeploymentEvent SideEffects []outbox.OutboxMessage ChainEvents []deployer_pb.DeploymentPSMEvent }
func (*TransitionData) AsCause ¶
func (td *TransitionData) AsCause() *psm_pb.Cause
func (*TransitionData) ChainEvent ¶
func (td *TransitionData) ChainEvent(event deployer_pb.DeploymentPSMEvent)
func (*TransitionData) FullCause ¶
func (td *TransitionData) FullCause() *deployer_pb.DeploymentEvent
func (*TransitionData) SideEffect ¶
func (td *TransitionData) SideEffect(msg outbox.OutboxMessage)
Click to show internal directories.
Click to hide internal directories.