Documentation
¶
Index ¶
- Constants
- Variables
- func CheckContainer(containerId string, healthCheck bool) (types.HealthStatus, bool, int, error)
- func CheckPodExitCode(files []string) (int, error)
- func DockerDump()
- func ForceKill(files []string) error
- func GenerateCmdParts(files []string, cmd string) ([]string, error)
- func GetAndRemoveLabel(key string, taskInfo *mesos.TaskInfo) string
- func GetContainerIdByService(files []string, service string) (string, error)
- func GetContainerIdsByServices(files, services []string) ([]string, error)
- func GetContainerNetwork(id string) (string, error)
- func GetDockerPorts(containerId string, privatePort string) (string, error)
- func GetLabel(key string, taskInfo *mesos.TaskInfo) string
- func GetPodContainerIds(files []string) ([]string, error)
- func GetPodDetail(files []string, primaryContainerId string, healthcheck bool)
- func GetPodStatus() types.PodStatus
- func GetPorts(taskInfo *mesos.TaskInfo) *list.Element
- func HealthCheck(files []string, podServices map[string]bool, out chan<- string)
- func InspectContainerDetails(containerId string, healthcheck bool) (types.ContainerStatusDetails, error)
- func IsService(taskInfo *mesos.TaskInfo) bool
- func KillContainer(sig string, containerId string) error
- func LaunchPod(files []string) types.PodStatus
- func ParseToContainerDetail(output string, healthcheck bool) (types.ContainerStatusDetails, error)
- func PullImage(files []string) error
- func RemoveNetwork(name string) error
- func RemovePodImage(files []string) error
- func RemovePodVolume(files []string) error
- func SendMesosStatus(driver executor.ExecutorDriver, taskId *mesos.TaskID, state *mesos.TaskState) error
- func SendPodStatus(status types.PodStatus)
- func SetPodStatus(status types.PodStatus)
- func StopPod(files []string) error
- func WaitOnPod(ctx *context.Context)
- type Status
Constants ¶
const ( OUTPUT_DELIMITER = "," PORT_SEPARATOR = ":" PRIM_INSPECT_RESULT_LEN = 7 INSPECT_RESULT_LEN = 6 )
Variables ¶
var ComposeExecutorDriver executor.ExecutorDriver
var ComposeFiles []string
var ComposeTaskInfo *mesos.TaskInfo
var CurPodStatus = &Status{ Status: types.POD_STAGING, }
var HealthCheckListId = make(map[string]bool)
var IsPodLaunched = false
var MonitorContainerList []string
var PluginOrder []string
var SinglePort bool
Functions ¶
func CheckContainer ¶
CheckContainer does check container details return healthy,run,err
func CheckPodExitCode ¶
Check exit code of all the containers in the pod. If all the exit codes are zero, then assign zero as pod's exit code, otherwise assign the first non zero exit code to pod
func DockerDump ¶
func DockerDump()
DockerDump does dump docker.pid and docker-containerd.pid and docker log if docker dump is enabled in config
func GenerateCmdParts ¶
Generate cmd parts docker-compose parts example : docker-compose -f compose.yaml up "docker-compose" will be the main cmd, "-f compose.yaml up" will be parts and return as an array
func GetAndRemoveLabel ¶
GetAndRemoveLabel will fetch the value for the key and removes it from the list
func GetContainerIdByService ¶
GetContainerIdByService does query container id by service name
func GetContainerIdsByServices ¶
GetContainerIdsByServices get container ids by a list of services
func GetContainerNetwork ¶
func GetPodContainerIds ¶
Get set of containers id in pod docker-compose -f docker-compose.yaml ps -q
func GetPodDetail ¶
docker-compose -f docker-compose.yaml ps
func HealthCheck ¶
healthCheck includes health checking for primary container and exit code checking for other containers
func InspectContainerDetails ¶
func InspectContainerDetails(containerId string, healthcheck bool) (types.ContainerStatusDetails, error)
docker inspect
func KillContainer ¶
func ParseToContainerDetail ¶
func ParseToContainerDetail(output string, healthcheck bool) (types.ContainerStatusDetails, error)
func RemoveNetwork ¶
func RemovePodImage ¶
remove pod images docker-compose down --rmi
func RemovePodVolume ¶
remove pod volume docker-compose down -v
func SendMesosStatus ¶
func SendMesosStatus(driver executor.ExecutorDriver, taskId *mesos.TaskID, state *mesos.TaskState) error
Update mesos and pod status