Documentation ¶
Index ¶
- func BindFlags(flags *pflag.FlagSet)
- func InDependencyOrder(ctx context.Context, services *Services, ...) error
- func NewCmdDeploy() *cobra.Command
- func NewCmdDeployInfra() *cobra.Command
- type DeployInfraOptions
- type DeployOptions
- type Graph
- func (g *Graph) AddEdge(source string, destination string) error
- func (g *Graph) AddVertex(key string, service string, initialStatus ServiceStatus)
- func (g *Graph) FilterChildren(key string, status ServiceStatus) []*Vertex
- func (g *Graph) HasCycles() (bool, error)
- func (g *Graph) Leaves() []*Vertex
- func (g *Graph) UpdateStatus(key string, status ServiceStatus)
- type Infra
- type ServiceStatus
- type Services
- type Vertex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InDependencyOrder ¶
func InDependencyOrder(ctx context.Context, services *Services, fn func(context.Context, string) error) error
InDependencyOrder applies the function to the services of the project taking in account the dependency order
func NewCmdDeploy ¶
func NewCmdDeployInfra ¶
Types ¶
type DeployInfraOptions ¶
func NewDeployInfraFlags ¶
func NewDeployInfraFlags() *DeployInfraOptions
func (*DeployInfraOptions) Complete ¶
func (o *DeployInfraOptions) Complete(cmd *cobra.Command, args []string) error
func (*DeployInfraOptions) Run ¶
func (o *DeployInfraOptions) Run() error
func (*DeployInfraOptions) Validate ¶
func (o *DeployInfraOptions) Validate() error
type DeployOptions ¶
type DeployOptions struct { Config *config.Config ServiceName string Tag string SkipBuildAndPush bool Services Services Infra Infra Service ecsdeploy.Service AutoApprove bool }
func NewDeployFlags ¶
func NewDeployFlags() *DeployOptions
func (*DeployOptions) Complete ¶
func (o *DeployOptions) Complete(cmd *cobra.Command, args []string) error
func (*DeployOptions) Run ¶
func (o *DeployOptions) Run() error
func (*DeployOptions) Validate ¶
func (o *DeployOptions) Validate() error
type Graph ¶
Graph represents project as service dependencies
func NewGraph ¶
func NewGraph(services Services, initialStatus ServiceStatus) *Graph
NewGraph returns the dependency graph of the services
func (*Graph) AddVertex ¶
func (g *Graph) AddVertex(key string, service string, initialStatus ServiceStatus)
func (*Graph) FilterChildren ¶
func (g *Graph) FilterChildren(key string, status ServiceStatus) []*Vertex
FilterChildren returns children of a certain vertex that are in a certain status
func (*Graph) UpdateStatus ¶
func (g *Graph) UpdateStatus(key string, status ServiceStatus)
UpdateStatus updates the status of a certain vertex
type ServiceStatus ¶
type ServiceStatus int
ServiceStatus indicates the status of a service
const ( ServiceStopped ServiceStatus = iota ServiceStarted )
Services status flags
Click to show internal directories.
Click to hide internal directories.