Documentation ¶
Index ¶
- Constants
- type EnvironmentFileResource
- func (envfile *EnvironmentFileResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error
- func (envfile *EnvironmentFileResource) BuildContainerDependency(containerName string, satisfied apicontainerstatus.ContainerStatus, ...)
- func (envfile *EnvironmentFileResource) Cleanup() error
- func (envfile *EnvironmentFileResource) Create() error
- func (envfile *EnvironmentFileResource) DependOnTaskNetwork() bool
- func (envfile *EnvironmentFileResource) DesiredTerminal() bool
- func (envfile *EnvironmentFileResource) GetAppliedStatus() resourcestatus.ResourceStatus
- func (envfile *EnvironmentFileResource) GetContainerDependencies(dependent resourcestatus.ResourceStatus) []apicontainer.ContainerDependency
- func (envfile *EnvironmentFileResource) GetContainerName() string
- func (envfile *EnvironmentFileResource) GetCreatedAt() time.Time
- func (envfile *EnvironmentFileResource) GetDesiredStatus() resourcestatus.ResourceStatus
- func (envfile *EnvironmentFileResource) GetKnownStatus() resourcestatus.ResourceStatus
- func (envfile *EnvironmentFileResource) GetName() string
- func (envfile *EnvironmentFileResource) GetTerminalReason() string
- func (envfile *EnvironmentFileResource) Initialize(resourceFields *taskresource.ResourceFields, taskKnownStatus status.TaskStatus, ...)
- func (envfile *EnvironmentFileResource) KnownCreated() bool
- func (envfile *EnvironmentFileResource) MarshalJSON() ([]byte, error)
- func (envfile *EnvironmentFileResource) NextKnownState() resourcestatus.ResourceStatus
- func (envfile *EnvironmentFileResource) ReadEnvVarsFromEnvfiles() ([]map[string]string, error)
- func (envfile *EnvironmentFileResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool
- func (envfile *EnvironmentFileResource) SetCreatedAt(createdAt time.Time)
- func (envfile *EnvironmentFileResource) SetDesiredStatus(status resourcestatus.ResourceStatus)
- func (envfile *EnvironmentFileResource) SetKnownStatus(status resourcestatus.ResourceStatus)
- func (envfile *EnvironmentFileResource) StatusString(status resourcestatus.ResourceStatus) string
- func (envfile *EnvironmentFileResource) SteadyState() resourcestatus.ResourceStatus
- func (envfile *EnvironmentFileResource) TerminalStatus() resourcestatus.ResourceStatus
- func (envfile *EnvironmentFileResource) UnmarshalJSON(b []byte) error
- type EnvironmentFileStatus
Constants ¶
const (
ResourceName = "envfile"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvironmentFileResource ¶
type EnvironmentFileResource struct {
// contains filtered or unexported fields
}
EnvironmentFileResource represents envfile as a task resource these environment files are retrieved from s3
func NewEnvironmentFileResource ¶
func NewEnvironmentFileResource(cluster, taskARN, region, dataDir, containerName string, envfiles []apicontainer.EnvironmentFile, credentialsManager credentials.Manager, executionCredentialsID string) (*EnvironmentFileResource, error)
NewEnvironmentFileResource creates a new EnvironmentFileResource object
func (*EnvironmentFileResource) ApplyTransition ¶
func (envfile *EnvironmentFileResource) ApplyTransition(nextState resourcestatus.ResourceStatus) error
ApplyTransition calls the function required to move to the specified status
func (*EnvironmentFileResource) BuildContainerDependency ¶
func (envfile *EnvironmentFileResource) BuildContainerDependency(containerName string, satisfied apicontainerstatus.ContainerStatus, dependent resourcestatus.ResourceStatus)
BuildContainerDependency adds a new dependency container and its satisfied status
func (*EnvironmentFileResource) Cleanup ¶
func (envfile *EnvironmentFileResource) Cleanup() error
Cleanup removes env file directory for the task
func (*EnvironmentFileResource) Create ¶
func (envfile *EnvironmentFileResource) Create() error
Create performs resource creation. This retrieves env file contents concurrently from s3 and writes them to disk
func (*EnvironmentFileResource) DependOnTaskNetwork ¶
func (envfile *EnvironmentFileResource) DependOnTaskNetwork() bool
DependOnTaskNetwork shows whether the resource creation needs task network setup beforehand
func (*EnvironmentFileResource) DesiredTerminal ¶
func (envfile *EnvironmentFileResource) DesiredTerminal() bool
DesiredTerminal returns true if the resource's desired status is REMOVED
func (*EnvironmentFileResource) GetAppliedStatus ¶
func (envfile *EnvironmentFileResource) GetAppliedStatus() resourcestatus.ResourceStatus
GetAppliedStatus safely returns the currently applied status of the resource
func (*EnvironmentFileResource) GetContainerDependencies ¶
func (envfile *EnvironmentFileResource) GetContainerDependencies(dependent resourcestatus.ResourceStatus) []apicontainer.ContainerDependency
GetContainerDependencies returns dependent containers for a status
func (*EnvironmentFileResource) GetContainerName ¶
func (envfile *EnvironmentFileResource) GetContainerName() string
GetContainerName returns the container that this resource is created for
func (*EnvironmentFileResource) GetCreatedAt ¶
func (envfile *EnvironmentFileResource) GetCreatedAt() time.Time
GetCreatedAt safely returns the timestamp for the resource's creation time
func (*EnvironmentFileResource) GetDesiredStatus ¶
func (envfile *EnvironmentFileResource) GetDesiredStatus() resourcestatus.ResourceStatus
GetDesiredStatus safely returns the desired status of the resource
func (*EnvironmentFileResource) GetKnownStatus ¶
func (envfile *EnvironmentFileResource) GetKnownStatus() resourcestatus.ResourceStatus
GetKnownStatus safely returns the currently known status of the resource
func (*EnvironmentFileResource) GetName ¶
func (envfile *EnvironmentFileResource) GetName() string
GetName returns the name of the environment file resource
func (*EnvironmentFileResource) GetTerminalReason ¶
func (envfile *EnvironmentFileResource) GetTerminalReason() string
GetTerminalReason returns an error string to propagate up through to to state change messages
func (*EnvironmentFileResource) Initialize ¶
func (envfile *EnvironmentFileResource) Initialize(resourceFields *taskresource.ResourceFields, taskKnownStatus status.TaskStatus, taskDesiredStatus status.TaskStatus)
Initialize initializes the EnvironmentFileResource
func (*EnvironmentFileResource) KnownCreated ¶
func (envfile *EnvironmentFileResource) KnownCreated() bool
KnownCreated returns true if the resource's known status is CREATED
func (*EnvironmentFileResource) MarshalJSON ¶
func (envfile *EnvironmentFileResource) MarshalJSON() ([]byte, error)
MarshalJSON serializes the EnvironmentFileResource struct to JSON
func (*EnvironmentFileResource) NextKnownState ¶
func (envfile *EnvironmentFileResource) NextKnownState() resourcestatus.ResourceStatus
NextKnownState returns the state that the resource should progress to based on its `KnownState`
func (*EnvironmentFileResource) ReadEnvVarsFromEnvfiles ¶
func (envfile *EnvironmentFileResource) ReadEnvVarsFromEnvfiles() ([]map[string]string, error)
ReadEnvVarsFromEnvFiles reads the environment files that have been downloaded and puts them into a list of maps
func (*EnvironmentFileResource) SetAppliedStatus ¶
func (envfile *EnvironmentFileResource) SetAppliedStatus(status resourcestatus.ResourceStatus) bool
SetAppliedStatus sets the applied status of the resource and returns whether the resource is already in a transition
func (*EnvironmentFileResource) SetCreatedAt ¶
func (envfile *EnvironmentFileResource) SetCreatedAt(createdAt time.Time)
SetCreatedAt safely sets the timestamp for the resource's creation time
func (*EnvironmentFileResource) SetDesiredStatus ¶
func (envfile *EnvironmentFileResource) SetDesiredStatus(status resourcestatus.ResourceStatus)
SetDesiredStatus safely sets the desired status of the resource
func (*EnvironmentFileResource) SetKnownStatus ¶
func (envfile *EnvironmentFileResource) SetKnownStatus(status resourcestatus.ResourceStatus)
SetKnownStatus safely sets the currently known status of the resource
func (*EnvironmentFileResource) StatusString ¶
func (envfile *EnvironmentFileResource) StatusString(status resourcestatus.ResourceStatus) string
StatusString returns the string representation of the resource status
func (*EnvironmentFileResource) SteadyState ¶
func (envfile *EnvironmentFileResource) SteadyState() resourcestatus.ResourceStatus
SteadyState returns the transition state of the resource defined as "ready"
func (*EnvironmentFileResource) TerminalStatus ¶
func (envfile *EnvironmentFileResource) TerminalStatus() resourcestatus.ResourceStatus
TerminalStatus returns the last transition state of the resource
func (*EnvironmentFileResource) UnmarshalJSON ¶
func (envfile *EnvironmentFileResource) UnmarshalJSON(b []byte) error
UnmarshalJSON deserializes the raw JSON to an EnvironmentFileResource struct
type EnvironmentFileStatus ¶
type EnvironmentFileStatus resourcestatus.ResourceStatus
const ( // EnvFileStatusNone is the zero state of a task resource EnvFileStatusNone EnvironmentFileStatus = iota // EnvFileCreated means the task resource is created EnvFileCreated // EnvFileRemoved means the task resource is cleaned up EnvFileRemoved )
func (*EnvironmentFileStatus) MarshalJSON ¶
func (envfileStatus *EnvironmentFileStatus) MarshalJSON() ([]byte, error)
MarshalJSON overrides the logic for JSON-encoding the ResourceStatus type.
func (EnvironmentFileStatus) String ¶
func (envfileStatus EnvironmentFileStatus) String() string
func (*EnvironmentFileStatus) UnmarshalJSON ¶
func (envfileStatus *EnvironmentFileStatus) UnmarshalJSON(b []byte) error
UnmarshalJSON overrides the logic for parsing the JSON-encoded ResourceStatus data.