types

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 9

Documentation

Index

Constants

View Source
const (
	LOGLEVEL                = "loglevel"
	CONTAINER_NAME          = "container_name"
	NETWORK_MODE            = "network_mode"
	HEALTH_CHECK            = "healthcheck"
	LINKS                   = "links"
	PORTS                   = "ports"
	LABELS                  = "labels"
	ENVIRONMENT             = "environment"
	RESTART                 = "restart"
	APP_START_TIME          = "appStartTime"
	SERVICES                = "services"
	IMAGE                   = "image"
	VERSION                 = "version"
	NETWORKS                = "networks"
	HOSTNAME                = "hostname"
	VOLUMES                 = "volumes"
	DEPENDS_ON              = "depends_on"
	EXTRA_HOSTS             = "extra_hosts"
	CGROUP_PARENT           = "cgroup_parent"
	HOST_MODE               = "host"
	NONE_NETWORK_MODE       = "none"
	NAME                    = "name"
	NETWORK_DRIVER          = "driver"
	NETWORK_DEFAULT_DRIVER  = "bridge"
	NETWORK_DEFAULT_NAME    = "default"
	NETWORK_EXTERNAL        = "external"
	PLUGIN_ORDER            = "pluginorder"
	INFRA_CONTAINER_YML     = "docker-infra-container.yml"
	INFRA_CONTAINER_GEN_YML = "docker-infra-container.yml-generated.yml"
	DEFAULT_FOLDER          = "poddata"
	NO_FOLDER               = "dontcreatefolder"
	RM_INFRA_CONTAINER      = "rm_infra_container"
	COMPOSE_HTTP_TIMEOUT    = "COMPOSE_HTTP_TIMEOUT"
	SERVICE_DETAIL          = "serviceDetail"
	INFRA_CONTAINER         = "networkproxy"
	IS_SERVICE              = "isService"
	FOREVER                 = 1<<63 - 1
	DCE_OUT                 = "dce.out"
	DCE_ERR                 = "dce.err"
)
View Source
const NoComposeFile err = "no compose file specified"

Variables

This section is empty.

Functions

func GetInstanceStatusTag added in v0.8.1

func GetInstanceStatusTag(svcContainer SvcContainer, healthy HealthStatus, running bool, exitCode int) map[string]string

Types

type CmdResult

type CmdResult struct {
	Result  error
	Command *exec_cmd.Cmd
}

type ContainerStatusDetails

type ContainerStatusDetails struct {
	ComposeTaskId *mesosproto.TaskID
	Pid           int
	ContainerId   string
	IsRunning     bool
	ExitCode      int
	HealthStatus  string
	RestartCount  int
	MaxRetryCount int
	Name          string
}

func (*ContainerStatusDetails) SetComposeTaskId

func (c *ContainerStatusDetails) SetComposeTaskId(composeTaskId *mesosproto.TaskID)

func (*ContainerStatusDetails) SetContainerId

func (c *ContainerStatusDetails) SetContainerId(containerId string)

type HealthStatus

type HealthStatus int
const (
	STARTING HealthStatus = 1 + iota
	HEALTHY
	UNHEALTHY
	UNKNOWN_HEALTH_STATUS
)

func (HealthStatus) String

func (status HealthStatus) String() string

type Network

type Network struct {
	PreExist bool
	Name     string
	Driver   string
}

type PodStatus

type PodStatus int
const (
	POD_STAGING PodStatus = 1 + iota
	POD_STARTING
	POD_RUNNING
	POD_FAILED
	POD_KILLED
	POD_FINISHED
	POD_PULL_FAILED
	POD_COMPOSE_CHECK_FAILED
	POD_EMPTY
)

func (PodStatus) String

func (status PodStatus) String() string

type ServiceDetail

type ServiceDetail map[string]map[string]interface{}

ServiceDetail key is filepath, value is map to store Unmarshal the docker-compose.yaml

type StepData

type StepData struct {
	RetryID    int               `json:"retryID,omitempty"`
	StepName   string            `json:"stepName,omitempty"`
	ErrorMsg   error             `json:"errorMsg,omitempty"`
	Status     string            `json:"status,omitempty"`
	Tags       map[string]string `json:"tags,omitempty"`
	StartTime  int64             `json:"startTime,omitempty"`
	EndTime    int64             `json:"endTime,omitempty"`
	ExecTimeMS int64             `json:"execTimeMS,omitempty"`
}

type SvcContainer added in v0.8.1

type SvcContainer struct {
	ServiceName string
	ContainerId string
	Pid         string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL