Documentation ¶
Overview ¶
Package initialize contains methods and structs needed to initialize jobs and services.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JobProps ¶
type JobProps struct { WorkloadProps Schedule string HealthCheck manifest.ContainerHealthCheck Timeout string Retries int }
JobProps contains the information needed to represent a Job.
type ServiceProps ¶
type ServiceProps struct { WorkloadProps Port uint16 HealthCheck manifest.ContainerHealthCheck Private bool FileUploads []manifest.FileUpload // contains filtered or unexported fields }
ServiceProps contains the information needed to represent a Service (port, HealthCheck, and workload common props).
type Store ¶
type Store interface { GetApplication(appName string) (*config.Application, error) CreateService(service *config.Workload) error CreateJob(job *config.Workload) error ListServices(appName string) ([]*config.Workload, error) ListJobs(appName string) ([]*config.Workload, error) }
Store represents the methods needed to add workloads to the SSM parameter store.
type WorkloadAdder ¶
type WorkloadAdder interface { AddJobToApp(app *config.Application, jobName string, opts ...cloudformation.AddWorkloadToAppOpt) error AddServiceToApp(app *config.Application, serviceName string, opts ...cloudformation.AddWorkloadToAppOpt) error }
WorkloadAdder contains the methods needed to add jobs and services to an existing application.
type WorkloadInitializer ¶
type WorkloadInitializer struct { Store Store Deployer WorkloadAdder Ws Workspace Prog Prog }
WorkloadInitializer holds the clients necessary to initialize either a service or job in an existing application.
func (*WorkloadInitializer) AddWorkloadToApp ¶ added in v1.30.0
func (w *WorkloadInitializer) AddWorkloadToApp(appName, name, workloadType string) error
AddWorkloadToApp contains the logic to create the SSM parameter and perform the stackset template update required to add any workload to the app. It does not write the manifest.
func (*WorkloadInitializer) Job ¶
func (w *WorkloadInitializer) Job(i *JobProps) (string, error)
Job writes the job manifest, creates an ECR repository, and adds the job to SSM.
func (*WorkloadInitializer) Service ¶
func (w *WorkloadInitializer) Service(i *ServiceProps) (string, error)
Service writes the service manifest, creates an ECR repository, and adds the service to SSM.
type WorkloadProps ¶
type WorkloadProps struct { App string Type string Name string DockerfilePath string Image string Platform manifest.PlatformArgsOrString Topics []manifest.TopicSubscription Queue manifest.SQSQueue PrivateOnlyEnvironments []string }
WorkloadProps contains the information needed to represent a Workload (job or service).
type Workspace ¶
type Workspace interface { Rel(path string) (string, error) WriteJobManifest(marshaler encoding.BinaryMarshaler, jobName string) (string, error) WriteServiceManifest(marshaler encoding.BinaryMarshaler, serviceName string) (string, error) }
Workspace contains the methods needed to manipulate a Copilot workspace.