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 // 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) error AddServiceToApp(app *config.Application, serviceName string) 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) 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 }
WorkloadProps contains the information needed to represent a Workload (job or service).
type Workspace ¶
type Workspace interface { Path() (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.