Documentation ¶
Index ¶
- Constants
- func IsStackNotExistsErr(err error) bool
- type App
- type AppDescriber
- type BackendServiceDescriber
- type CfnResource
- type ConfigStoreSvc
- type DeployedEnvServicesLister
- type EnvDescriber
- type EnvDescription
- type EnvironmentVPC
- type HumanJSONStringer
- type NewBackendServiceConfig
- type NewEnvDescriberConfig
- type NewServiceConfig
- type NewServiceStatusConfig
- type NewWebServiceConfig
- type Pipeline
- type PipelineDescriber
- type PipelineStatus
- type PipelineStatusDescriber
- type ServiceConfig
- type ServiceDescriber
- func (d *ServiceDescriber) EnvOutputs() (map[string]string, error)
- func (d *ServiceDescriber) EnvVars() ([]*ecs.ContainerEnvVar, error)
- func (d *ServiceDescriber) Params() (map[string]string, error)
- func (d *ServiceDescriber) Secrets() ([]*ecs.ContainerSecret, error)
- func (d *ServiceDescriber) ServiceStackResources() ([]*cloudformation.StackResource, error)
- type ServiceDiscovery
- type ServiceStatus
- type ServiceStatusDesc
- type WebServiceDescriber
- type WebServiceRoute
- type WebServiceURI
Constants ¶
const ( // BlankServiceDiscoveryURI is an empty URI to denote services // that cannot be reached with Service Discovery. BlankServiceDiscoveryURI = "-" )
Variables ¶
This section is empty.
Functions ¶
func IsStackNotExistsErr ¶
IsStackNotExistsErr returns true if error type is stack not exist.
Types ¶
type App ¶
type App struct { Name string `json:"name"` URI string `json:"uri"` Envs []*config.Environment `json:"environments"` Services []*config.Workload `json:"services"` Pipelines []*codepipeline.Pipeline `json:"pipelines"` }
App contains serialized parameters for an application.
func (*App) HumanString ¶
HumanString returns the stringified App struct with human readable format.
func (*App) JSONString ¶
JSONString returns the stringified App struct with json format.
type AppDescriber ¶ added in v1.5.0
type AppDescriber struct {
// contains filtered or unexported fields
}
AppDescriber retrieves information about an application.
func NewAppDescriber ¶ added in v1.5.0
func NewAppDescriber(appName string) (*AppDescriber, error)
NewAppDescriber instantiates an application describer.
func (*AppDescriber) Version ¶ added in v1.5.0
func (d *AppDescriber) Version() (string, error)
Version returns the app CloudFormation template version associated with the application by reading the Metadata.Version field from the template. Specifically it will get both app CFN stack template version and app StackSet template version, and return the minimum as the current app version.
If the Version field does not exist, then it's a legacy template and it returns an deploy.LegacyAppTemplateVersion and nil error.
type BackendServiceDescriber ¶
type BackendServiceDescriber struct {
// contains filtered or unexported fields
}
BackendServiceDescriber retrieves information about a backend service.
func NewBackendServiceDescriber ¶
func NewBackendServiceDescriber(opt NewBackendServiceConfig) (*BackendServiceDescriber, error)
NewBackendServiceDescriber instantiates a backend service describer.
func (*BackendServiceDescriber) Describe ¶
func (d *BackendServiceDescriber) Describe() (HumanJSONStringer, error)
Describe returns info of a backend service.
type CfnResource ¶
CfnResource contains application resources created by cloudformation.
func (CfnResource) HumanString ¶
func (c CfnResource) HumanString() string
HumanString returns the stringified CfnResource struct with human readable format.
type ConfigStoreSvc ¶
type ConfigStoreSvc interface { GetEnvironment(appName string, environmentName string) (*config.Environment, error) ListEnvironments(appName string) ([]*config.Environment, error) ListServices(appName string) ([]*config.Workload, error) }
ConfigStoreSvc wraps methods of config store.
type DeployedEnvServicesLister ¶
type DeployedEnvServicesLister interface { ListEnvironmentsDeployedTo(appName string, svcName string) ([]string, error) ListDeployedServices(appName string, envName string) ([]string, error) }
DeployedEnvServicesLister wraps methods of deploy store.
type EnvDescriber ¶
type EnvDescriber struct {
// contains filtered or unexported fields
}
EnvDescriber retrieves information about an environment.
func NewEnvDescriber ¶
func NewEnvDescriber(opt NewEnvDescriberConfig) (*EnvDescriber, error)
NewEnvDescriber instantiates an environment describer.
func (*EnvDescriber) Describe ¶
func (d *EnvDescriber) Describe() (*EnvDescription, error)
Describe returns info about an application's environment.
func (*EnvDescriber) Version ¶ added in v0.5.0
func (d *EnvDescriber) Version() (string, error)
Version returns the CloudFormation template version associated with the environment by reading the Metadata.Version field from the template.
If the Version field does not exist, then it's a legacy template and it returns an deploy.LegacyEnvTemplateVersion and nil error.
type EnvDescription ¶
type EnvDescription struct { Environment *config.Environment `json:"environment"` Services []*config.Workload `json:"services"` Tags map[string]string `json:"tags,omitempty"` Resources []*CfnResource `json:"resources,omitempty"` EnvironmentVPC EnvironmentVPC `json:"environmentVPC"` }
EnvDescription contains the information about an environment.
func (*EnvDescription) HumanString ¶
func (e *EnvDescription) HumanString() string
HumanString returns the stringified EnvDescription struct with human readable format.
func (*EnvDescription) JSONString ¶
func (e *EnvDescription) JSONString() (string, error)
JSONString returns the stringified EnvDescription struct with json format.
type EnvironmentVPC ¶ added in v0.6.0
type EnvironmentVPC struct { ID string `json:"id"` PublicSubnetIDs []string `json:"publicSubnetIDs"` PrivateSubnetIDs []string `json:"privateSubnetIDs"` }
EnvironmentVPC holds the ID of the environment's VPC configuration.
type HumanJSONStringer ¶
HumanJSONStringer contains methods that stringify app info for output.
type NewBackendServiceConfig ¶
type NewBackendServiceConfig struct { NewServiceConfig EnableResources bool DeployStore DeployedEnvServicesLister }
NewBackendServiceConfig contains fields that initiates BackendServiceDescriber struct.
type NewEnvDescriberConfig ¶
type NewEnvDescriberConfig struct { App string Env string EnableResources bool ConfigStore ConfigStoreSvc DeployStore DeployedEnvServicesLister }
NewEnvDescriberConfig contains fields that initiates EnvDescriber struct.
type NewServiceConfig ¶
type NewServiceConfig struct { App string Env string Svc string ConfigStore ConfigStoreSvc }
NewServiceConfig contains fields that initiates ServiceDescriber struct.
type NewServiceStatusConfig ¶
type NewServiceStatusConfig struct { App string Env string Svc string ConfigStore ConfigStoreSvc }
NewServiceStatusConfig contains fields that initiates ServiceStatus struct.
type NewWebServiceConfig ¶
type NewWebServiceConfig struct { NewServiceConfig EnableResources bool DeployStore DeployedEnvServicesLister }
NewWebServiceConfig contains fields that initiates WebServiceDescriber struct.
type Pipeline ¶
type Pipeline struct { codepipeline.Pipeline Resources []*CfnResource `json:"resources,omitempty"` }
Pipeline contains serialized parameters for a pipeline.
func (*Pipeline) HumanString ¶
HumanString returns the stringified Pipeline struct with human readable format.
func (*Pipeline) JSONString ¶
JSONString returns the stringified Pipeline struct with JSON format.
type PipelineDescriber ¶
type PipelineDescriber struct {
// contains filtered or unexported fields
}
PipelineDescriber retrieves information about an application.
func NewPipelineDescriber ¶
func NewPipelineDescriber(pipelineName string, showResources bool) (*PipelineDescriber, error)
NewPipelineDescriber instantiates a new pipeline describer
func (*PipelineDescriber) Describe ¶
func (d *PipelineDescriber) Describe() (HumanJSONStringer, error)
Describe returns description of a pipeline.
type PipelineStatus ¶
type PipelineStatus struct {
codepipeline.PipelineState
}
PipelineStatus contains the status for a pipeline.
func (PipelineStatus) HumanString ¶
func (p PipelineStatus) HumanString() string
HumanString returns stringified PipelineStatus struct with human readable format.
func (PipelineStatus) JSONString ¶
func (p PipelineStatus) JSONString() (string, error)
JSONString returns stringified PipelineStatus struct with json format.
type PipelineStatusDescriber ¶
type PipelineStatusDescriber struct {
// contains filtered or unexported fields
}
PipelineStatusDescriber retrieves status of a pipeline.
func NewPipelineStatusDescriber ¶
func NewPipelineStatusDescriber(pipelineName string) (*PipelineStatusDescriber, error)
NewPipelineStatusDescriber instantiates a new PipelineStatus struct.
func (*PipelineStatusDescriber) Describe ¶
func (d *PipelineStatusDescriber) Describe() (HumanJSONStringer, error)
Describe returns status of a pipeline.
type ServiceConfig ¶
type ServiceConfig struct { Environment string `json:"environment"` Port string `json:"port"` Tasks string `json:"tasks"` CPU string `json:"cpu"` Memory string `json:"memory"` }
ServiceConfig contains serialized configuration parameters for a service.
type ServiceDescriber ¶
type ServiceDescriber struct {
// contains filtered or unexported fields
}
ServiceDescriber retrieves information about a service.
func NewServiceDescriber ¶
func NewServiceDescriber(opt NewServiceConfig) (*ServiceDescriber, error)
NewServiceDescriber instantiates a new service.
func (*ServiceDescriber) EnvOutputs ¶
func (d *ServiceDescriber) EnvOutputs() (map[string]string, error)
EnvOutputs returns the output of the environment stack.
func (*ServiceDescriber) EnvVars ¶
func (d *ServiceDescriber) EnvVars() ([]*ecs.ContainerEnvVar, error)
EnvVars returns the environment variables of the task definition.
func (*ServiceDescriber) Params ¶
func (d *ServiceDescriber) Params() (map[string]string, error)
Params returns the parameters of the service stack.
func (*ServiceDescriber) Secrets ¶ added in v1.1.0
func (d *ServiceDescriber) Secrets() ([]*ecs.ContainerSecret, error)
Secrets returns the secrets of the task definition.
func (*ServiceDescriber) ServiceStackResources ¶
func (d *ServiceDescriber) ServiceStackResources() ([]*cloudformation.StackResource, error)
ServiceStackResources returns the filtered service stack resources created by CloudFormation.
type ServiceDiscovery ¶
type ServiceDiscovery struct { Environment []string `json:"environment"` Namespace string `json:"namespace"` }
ServiceDiscovery contains serialized service discovery info for an service.
type ServiceStatus ¶
type ServiceStatus struct {
// contains filtered or unexported fields
}
ServiceStatus retrieves status of a service.
func NewServiceStatus ¶
func NewServiceStatus(opt *NewServiceStatusConfig) (*ServiceStatus, error)
NewServiceStatus instantiates a new ServiceStatus struct.
func (*ServiceStatus) Describe ¶
func (s *ServiceStatus) Describe() (*ServiceStatusDesc, error)
Describe returns status of a service.
type ServiceStatusDesc ¶
type ServiceStatusDesc struct { Service awsECS.ServiceStatus Tasks []awsECS.TaskStatus `json:"tasks"` Alarms []cloudwatch.AlarmStatus `json:"alarms"` }
ServiceStatusDesc contains the status for a service.
func (*ServiceStatusDesc) HumanString ¶
func (s *ServiceStatusDesc) HumanString() string
HumanString returns the stringified ServiceStatusDesc struct with human readable format.
func (*ServiceStatusDesc) JSONString ¶
func (s *ServiceStatusDesc) JSONString() (string, error)
JSONString returns the stringified ServiceStatusDesc struct with json format.
type WebServiceDescriber ¶
type WebServiceDescriber struct {
// contains filtered or unexported fields
}
WebServiceDescriber retrieves information about a load balanced web service.
func NewWebServiceDescriber ¶
func NewWebServiceDescriber(opt NewWebServiceConfig) (*WebServiceDescriber, error)
NewWebServiceDescriber instantiates a load balanced service describer.
func (*WebServiceDescriber) Describe ¶
func (d *WebServiceDescriber) Describe() (HumanJSONStringer, error)
Describe returns info of a web service.
type WebServiceRoute ¶
WebServiceRoute contains serialized route parameters for a web service.
type WebServiceURI ¶
type WebServiceURI struct { DNSName string // The environment's subdomain if the service is served on HTTPS. Otherwise, the public load balancer's DNS. Path string // Empty if the service is served on HTTPS. Otherwise, the pattern used to match the service. }
WebServiceURI represents the unique identifier to access a web service.
func (*WebServiceURI) String ¶
func (uri *WebServiceURI) String() string