Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BcsKV

type BcsKV struct {
	Key   string
	Value string
}

BcsKV key/value structure for anywhere necessary

type BcsPort

type BcsPort struct {
	Name          string `json:"name,omitempty"`
	ContainerPort string `json:"containerPort,omitempty"`
	HostPort      string `json:"hostPort,omitempty"`
	Protocol      string `json:"protocol,omitempty"`
	HostIP        string `json:"hostIP,omitempty"` //use for host has multiple ip address
}

BcsPort port service for process port reflection

type BcsProcessInfo

type BcsProcessInfo struct {
	ID          string                 `json:"ID,omitempty"`          //container ID
	Name        string                 `json:"Name,omitempty"`        //container name
	Pid         int                    `json:"Pid,omitempty"`         //container pid
	StartAt     time.Time              `json:"StartAt,omitempty"`     //startting time
	FinishAt    time.Time              `json:"FinishAt,omitempty"`    //Exit time
	Status      string                 `json:"Status,omitempty"`      //status string, paused, restarting, running, dead, created, exited
	Healthy     bool                   `json:"Healthy,omitempty"`     //Container healthy
	ExitCode    int                    `json:"ExitCode,omitempty"`    //container exit code
	Hostname    string                 `json:"Hostname,omitempty"`    //container host name
	NetworkMode string                 `json:"NetworkMode,omitempty"` //Network mode for container
	IPAddress   string                 `json:"IPAddress,omitempty"`   //Contaienr IP address
	NodeAddress string                 `json:"NodeAddress,omitempty"` //node host address
	Ports       []BcsPort              `json:"Ports,omitempty"`       //ports info for report
	Message     string                 `json:"Message,omitempty"`     //status message for container
	Resource    *schedTypes.Resource   `json:"Resource,omitempty"`
	BcsMessage  *schedTypes.BcsMessage `json:",omitempty"`
}

BcsProcessInfo only for BcsExecutor

type CallbackFuncType

type CallbackFuncType string

CallbackFuncType

const (
	CallbackFuncUpdateTask CallbackFuncType = "UpdateTaskFunc"
)

type CheckSum

type CheckSum struct {
	Md5 string
}

type ExecutorStatus

type ExecutorStatus string

ExecutorStatus type

const (
	ExecutorStatusUnknown   ExecutorStatus = "unknown"
	ExecutorStatusLaunching ExecutorStatus = "launching"
	ExecutorStatusRunning   ExecutorStatus = "running"
	ExecutorStatusShutdown  ExecutorStatus = "shutdown"
	ExecutorStatusFinish    ExecutorStatus = "finish"
)

type HeartBeat

type HeartBeat struct {
	ProcessId  string
	ExecutorId string
	Type       HeartBeatType
}

executor & process daemon heartbeat mechanism

type HeartBeatType

type HeartBeatType string
const (
	HeartBeatPing HeartBeatType = "ping"
	HeartBeatPong HeartBeatType = "pong"
)

type JfrogRegistry

type JfrogRegistry struct {
	DownloadUri string
	Checksums   *CheckSum
}

type LocalFile

type LocalFile struct {
	To    string
	Right string
	User  string
	Value string
}

local file

type ProcessInfo

type ProcessInfo struct {
	Id string

	//process info
	WorkDir          string //进程工作目录
	ProcessName      string //进程名,pid文件所对应的名称
	Uris             []*Uri //process packages uris
	PidFile          string //process pid file path
	StartCmd         string //process start command
	StartGracePeriod int64  //start process grace period seconds
	StopCmd          string //process stop command
	StopTimeout      int
	KillCmd          string //kill -9
	Resource         *bcstype.Resource
	Envs             []string // in the form "key=value".
	Argv             []string
	User             string

	//status info
	StatusInfo *ProcessStatusInfo

	//exexutor
	ExecutorId            string //process executor id
	ExecutorHeartBeatTime int64  //process daemon & process executor last heartbeat time
}

type ProcessStatusInfo

type ProcessStatusInfo struct {
	Id            string
	Status        ProcessStatusType
	ExitCode      int    //'0' show finish, >'0' show failed
	Message       string //if failed,then message
	Pid           int
	RegisterTime  int64
	LastStartTime int64
}

type ProcessStatusType

type ProcessStatusType string
const (
	ProcessStatusStaging  ProcessStatusType = "staging"
	ProcessStatusStarting ProcessStatusType = "starting"
	ProcessStatusRunning  ProcessStatusType = "running"
	ProcessStatusStopping ProcessStatusType = "stopping"
	ProcessStatusStopped  ProcessStatusType = "stopped"
)

type ProcessTaskInfo

type ProcessTaskInfo struct {
	TaskId     string
	LocalFiles []*LocalFile

	ProcInfo *ProcessInfo
	Status   TaskStatus
	// contains filtered or unexported fields
}

type TaskStatus

type TaskStatus string

process task status type

const (
	TaskStatusStaging  TaskStatus = "staging"
	TaskStatusStarting TaskStatus = "starting"
	TaskStatusRunning  TaskStatus = "running"
	TaskStatusKilling  TaskStatus = "killing"
	TaskStatusFailed   TaskStatus = "failed"
	TaskStatusFinish   TaskStatus = "finish"
	TaskStatusError    TaskStatus = "error"
)

type UpdateTaskFunc

type UpdateTaskFunc func(*mesos.TaskStatus) error

type Uri

type Uri struct {
	Value        string //process package registry uri, example for "http://xxx.artifactory.xxx.com/xxx/v1/pack.tar.gz"
	User         string //package registry user
	Pwd          string //package registry password, example for curl -u 'user:pwd' -X GET "http://xxx.artifactory.xxx.com/xxx/v1/pack.tar.gz"
	OutputDir    string
	ExtractDir   string
	PackagesFile string
}

Source Files