Documentation ¶
Index ¶
- Constants
- Variables
- type ManagedDaemon
- func (md *ManagedDaemon) AddEnvVar(envKey string, envVal string) error
- func (md *ManagedDaemon) AddMountPoint(mp *MountPoint) error
- func (md *ManagedDaemon) DeleteEnvVar(envKey string) error
- func (md *ManagedDaemon) DeleteMountPoint(mp *MountPoint) error
- func (md *ManagedDaemon) GetAgentCommunicationMount() *MountPoint
- func (md *ManagedDaemon) GetApplicationLogMount() *MountPoint
- func (md *ManagedDaemon) GetCommand() []string
- func (md *ManagedDaemon) GetContainerCGroup() string
- func (md *ManagedDaemon) GetContainerId() string
- func (md *ManagedDaemon) GetDockerHealthConfig() *dockercontainer.HealthConfig
- func (md *ManagedDaemon) GetEnvironment() map[string]string
- func (md *ManagedDaemon) GetFilteredMountPoints() []*MountPoint
- func (md *ManagedDaemon) GetHealthCheckInterval() time.Duration
- func (md *ManagedDaemon) GetHealthCheckRetries() int
- func (md *ManagedDaemon) GetHealthCheckTest() []string
- func (md *ManagedDaemon) GetHealthCheckTimeout() time.Duration
- func (md *ManagedDaemon) GetImageName() string
- func (md *ManagedDaemon) GetImageRef() string
- func (md *ManagedDaemon) GetImageTag() string
- func (md *ManagedDaemon) GetImageTarPath() string
- func (md *ManagedDaemon) GetLinuxParameters() *ecsacs.LinuxParameters
- func (md *ManagedDaemon) GetLoadedDaemonImageRef() string
- func (md *ManagedDaemon) GetMountPointIndex(mp *MountPoint) int
- func (md *ManagedDaemon) GetMountPoints() []*MountPoint
- func (md *ManagedDaemon) GetNetworkNameSpace() string
- func (md *ManagedDaemon) GetPrivileged() bool
- func (md *ManagedDaemon) IsValidManagedDaemon() bool
- func (md *ManagedDaemon) SetAgentCommunicationMount(mp *MountPoint) error
- func (md *ManagedDaemon) SetApplicationLogMount(mp *MountPoint) error
- func (md *ManagedDaemon) SetCommand(command []string)
- func (md *ManagedDaemon) SetContainerCGroup(containerCGroup string)
- func (md *ManagedDaemon) SetContainerId(containerId string)
- func (md *ManagedDaemon) SetEnvironment(environment map[string]string)
- func (md *ManagedDaemon) SetHealthCheck(healthCheckTest []string, healthCheckInterval time.Duration, ...)
- func (md *ManagedDaemon) SetLoadedDaemonImageRef(loadedImageRef string)
- func (md *ManagedDaemon) SetMountPoints(mountPoints []*MountPoint) error
- func (md *ManagedDaemon) SetNetworkNameSpace(networkNameSpace string)
- func (md *ManagedDaemon) SetPrivileged(isPrivileged bool)
- func (md *ManagedDaemon) UpdateEnvVar(envKey string, envVal string) error
- func (md *ManagedDaemon) UpdateMountPointBySourceVolume(mp *MountPoint) error
- type MountPoint
Constants ¶
const (
EbsCsiDriver = "ebs-csi-driver"
)
Variables ¶
var ImportAll = defaultImportAll
Functions ¶
This section is empty.
Types ¶
type ManagedDaemon ¶
type ManagedDaemon struct {
// contains filtered or unexported fields
}
func NewManagedDaemon ¶
func NewManagedDaemon( imageName string, imageTag string, ) *ManagedDaemon
A valid managed daemon will require healthcheck and mount points to be added
func (*ManagedDaemon) AddEnvVar ¶
func (md *ManagedDaemon) AddEnvVar(envKey string, envVal string) error
AddEnvVar will add by envKey and will throw an error if an existing envKey is found
func (*ManagedDaemon) AddMountPoint ¶
func (md *ManagedDaemon) AddMountPoint(mp *MountPoint) error
AddMountPoint will add by MountPoint.SourceVolume which is unique to the task and is a required field and will throw an error if an existing MountPoint.SourceVolume is found
func (*ManagedDaemon) DeleteEnvVar ¶
func (md *ManagedDaemon) DeleteEnvVar(envKey string) error
Deletes environment variable by envKey and will throw an error if the envKey is not found
func (*ManagedDaemon) DeleteMountPoint ¶
func (md *ManagedDaemon) DeleteMountPoint(mp *MountPoint) error
UpdateMountPoint will delete by MountPoint.SourceVolume which is unique to the task and will throw an error if the MountPoint.SourceVolume is not found
func (*ManagedDaemon) GetAgentCommunicationMount ¶
func (md *ManagedDaemon) GetAgentCommunicationMount() *MountPoint
func (*ManagedDaemon) GetApplicationLogMount ¶
func (md *ManagedDaemon) GetApplicationLogMount() *MountPoint
func (*ManagedDaemon) GetCommand ¶
func (md *ManagedDaemon) GetCommand() []string
func (*ManagedDaemon) GetContainerCGroup ¶
func (md *ManagedDaemon) GetContainerCGroup() string
func (*ManagedDaemon) GetContainerId ¶
func (md *ManagedDaemon) GetContainerId() string
func (*ManagedDaemon) GetDockerHealthConfig ¶
func (md *ManagedDaemon) GetDockerHealthConfig() *dockercontainer.HealthConfig
Generates a DockerHealthConfig object from the ManagedDaeemon Health Check fields
func (*ManagedDaemon) GetEnvironment ¶
func (md *ManagedDaemon) GetEnvironment() map[string]string
func (*ManagedDaemon) GetFilteredMountPoints ¶
func (md *ManagedDaemon) GetFilteredMountPoints() []*MountPoint
returns list of mountpoints without the agentCommunicationMount and applicationLogMount
func (*ManagedDaemon) GetHealthCheckInterval ¶
func (md *ManagedDaemon) GetHealthCheckInterval() time.Duration
func (*ManagedDaemon) GetHealthCheckRetries ¶
func (md *ManagedDaemon) GetHealthCheckRetries() int
func (*ManagedDaemon) GetHealthCheckTest ¶
func (md *ManagedDaemon) GetHealthCheckTest() []string
func (*ManagedDaemon) GetHealthCheckTimeout ¶
func (md *ManagedDaemon) GetHealthCheckTimeout() time.Duration
func (*ManagedDaemon) GetImageName ¶
func (md *ManagedDaemon) GetImageName() string
func (*ManagedDaemon) GetImageRef ¶
func (md *ManagedDaemon) GetImageRef() string
func (*ManagedDaemon) GetImageTag ¶
func (md *ManagedDaemon) GetImageTag() string
func (*ManagedDaemon) GetImageTarPath ¶
func (md *ManagedDaemon) GetImageTarPath() string
func (*ManagedDaemon) GetLinuxParameters ¶
func (md *ManagedDaemon) GetLinuxParameters() *ecsacs.LinuxParameters
func (*ManagedDaemon) GetLoadedDaemonImageRef ¶
func (md *ManagedDaemon) GetLoadedDaemonImageRef() string
func (*ManagedDaemon) GetMountPointIndex ¶
func (md *ManagedDaemon) GetMountPointIndex(mp *MountPoint) int
GetMountPointIndex will return index of a mountpoint or -1 search by the unique MountPoint.SourceVolume field
func (*ManagedDaemon) GetMountPoints ¶
func (md *ManagedDaemon) GetMountPoints() []*MountPoint
returns list of mountpoints which (re)integrates agentCommunicationMount and applicationLogMount these will always include host mount file overrides
func (*ManagedDaemon) GetNetworkNameSpace ¶
func (md *ManagedDaemon) GetNetworkNameSpace() string
func (*ManagedDaemon) GetPrivileged ¶
func (md *ManagedDaemon) GetPrivileged() bool
func (*ManagedDaemon) IsValidManagedDaemon ¶
func (md *ManagedDaemon) IsValidManagedDaemon() bool
Validates that all required fields are present and valid
func (*ManagedDaemon) SetAgentCommunicationMount ¶
func (md *ManagedDaemon) SetAgentCommunicationMount(mp *MountPoint) error
Used to set or to update the agentCommunicationMount
func (*ManagedDaemon) SetApplicationLogMount ¶
func (md *ManagedDaemon) SetApplicationLogMount(mp *MountPoint) error
Used to set or to update the applicationLogMount
func (*ManagedDaemon) SetCommand ¶
func (md *ManagedDaemon) SetCommand(command []string)
func (*ManagedDaemon) SetContainerCGroup ¶
func (md *ManagedDaemon) SetContainerCGroup(containerCGroup string)
func (*ManagedDaemon) SetContainerId ¶
func (md *ManagedDaemon) SetContainerId(containerId string)
func (*ManagedDaemon) SetEnvironment ¶
func (md *ManagedDaemon) SetEnvironment(environment map[string]string)
func (*ManagedDaemon) SetHealthCheck ¶
func (*ManagedDaemon) SetLoadedDaemonImageRef ¶
func (md *ManagedDaemon) SetLoadedDaemonImageRef(loadedImageRef string)
func (*ManagedDaemon) SetMountPoints ¶
func (md *ManagedDaemon) SetMountPoints(mountPoints []*MountPoint) error
filter mount points for agentCommunicationMount set required mounts and override host paths in favor of agent defaults when a duplicate SourceVolumeID is given, the last Mount wins
func (*ManagedDaemon) SetNetworkNameSpace ¶
func (md *ManagedDaemon) SetNetworkNameSpace(networkNameSpace string)
func (*ManagedDaemon) SetPrivileged ¶
func (md *ManagedDaemon) SetPrivileged(isPrivileged bool)
func (*ManagedDaemon) UpdateEnvVar ¶
func (md *ManagedDaemon) UpdateEnvVar(envKey string, envVal string) error
Updates environment varable by evnKey and will throw an error if the envKey is not found
func (*ManagedDaemon) UpdateMountPointBySourceVolume ¶
func (md *ManagedDaemon) UpdateMountPointBySourceVolume(mp *MountPoint) error
UpdateMountPoint will update by MountPoint.SourceVolume which is unique to the task and will throw an error if the MountPoint.SourceVolume is not found
type MountPoint ¶
type MountPoint struct { // SourceVolumeID is used to identify the task volume globally, it's empty // when for internal mount points. SourceVolumeID string `json:"SourceVolumeID"` // SourceVolume is the name of the source volume, it's unique within the task. SourceVolume string `json:"SourceVolume,omitempty"` // SourceVolumeType is the type (EFS, EBS, or host) of the volume. EBS Volumes in particular are // treated differently within the microVM, and need special consideration in determining the microVM path. SourceVolumeType string `json:"SourceVolumeType,omitempty"` SourceVolumeHostPath string `json:"SourceVolumeHostPath,omitempty"` ContainerPath string `json:"ContainerPath,omitempty"` ReadOnly bool `json:"ReadOnly,omitempty"` Internal bool `json:"Internal,omitempty"` // https://github.com/moby/moby/blob/master/api/types/mount/mount.go#L46-L56 PropagationShared bool `json:"PropagationShared,omitempty"` }