controlcommands package - github.com/AliceO2Group/Control/core/controlcommands - Go Packages

Package controlcommands defines the Command interface, plus several types including MesosCommand, MesosCommandResponse and related. It contains what's needed to represent the serializable requests and responses that are then transferred over the Mesos transport.

This section is empty.

This section is empty.

type Call struct {
	Request  MesosCommand
	Response MesosCommandResponse
	Done     chan empty
	Error    error
}

Call represents an active request, pending response

func NewCall(cmd MesosCommand) *Call
type CallId struct {
	Id     xid.ID
	Target MesosCommandTarget
}

type MesosCommandBase

type MesosCommandBase struct {
	Name            string               `json:"name"`
	Id              xid.ID               `json:"id"`
	EnvironmentId   uid.ID               `json:"environmentId"`
	ResponseTimeout time.Duration        `json:"timeout"`
	Arguments       PropertyMap          `json:"arguments"`
	TargetList      []MesosCommandTarget `json:"targetList"`
	Labels          map[string]string    `json:"labels"`
	
}

func (*MesosCommandBase) GetId

func (*MesosCommandBase) GetLabels added in v0.49.0

type MesosCommandResponseBase

type MesosCommandResponseBase struct {
	CommandName     string               `json:"name"`
	CommandId       xid.ID               `json:"id"`
	EnvironmentId   uid.ID               `json:"environmentId"`
	ErrorString     string               `json:"error"`
	MessageType     string               `json:"_messageType"`
	ResponseSenders []MesosCommandTarget `json:"-"`
}

func (*MesosCommandResponseBase) Err

func (*MesosCommandResponseBase) Errors added in v0.26.80

dummy implementation for single-origin responses which defaults to Err()

type MesosCommandTarget

type MesosCommandTarget struct {
	AgentId    mesos.AgentID
	ExecutorId mesos.ExecutorID
	TaskId     mesos.TaskID
}
type PropertyMapsMap map[MesosCommandTarget]PropertyMap
type Servent struct {
	SendFunc SendCommandFunc
	
}
func NewServent(commandFunc SendCommandFunc) *Servent
func (s *Servent) ProcessResponse(res MesosCommandResponse, sender MesosCommandTarget)