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.
- Constants
- type Call
- type CallId
- type Command
- type CommandQueue
- type MesosCommand
- type MesosCommandBase
- func (m *MesosCommandBase) GetEnvironmentId() uid.ID
- func (m *MesosCommandBase) GetId() xid.ID
- func (m *MesosCommandBase) GetLabels() map[string]string
- func (m *MesosCommandBase) GetName() string
- func (m *MesosCommandBase) GetResponseTimeout() time.Duration
- func (m *MesosCommandBase) IsMultiCmd() bool
- func (m *MesosCommandBase) IsMutator() bool
- func (m *MesosCommandBase) MakeSingleTarget(receiver MesosCommandTarget) (cmd MesosCommand)
- type MesosCommandMultiResponse
- func (m *MesosCommandMultiResponse) Err() error
- func (m *MesosCommandMultiResponse) Errors() map[MesosCommandTarget]error
- func (m *MesosCommandMultiResponse) GetResponseSenders() []MesosCommandTarget
- func (m *MesosCommandMultiResponse) GetResponses() map[MesosCommandTarget]MesosCommandResponse
- func (m *MesosCommandMultiResponse) IsMultiResponse() bool
- type MesosCommandResponse
- type MesosCommandResponseBase
- func (m *MesosCommandResponseBase) Err() error
- func (m *MesosCommandResponseBase) Errors() map[MesosCommandTarget]error
- func (m *MesosCommandResponseBase) GetCommandId() xid.ID
- func (m *MesosCommandResponseBase) GetCommandName() string
- func (m *MesosCommandResponseBase) GetEnvironmentId() uid.ID
- func (m *MesosCommandResponseBase) GetResponseSenders() []MesosCommandTarget
- func (m *MesosCommandResponseBase) IsMultiResponse() bool
- type MesosCommandResponse_Transition
- type MesosCommandResponse_TriggerHook
- type MesosCommandTarget
- type MesosCommand_Transition
- type MesosCommand_TriggerHook
- type PropertyMap
- type PropertyMapsMap
- type SendCommandFunc
- type Servent
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"`
}
type MesosCommandResponseBase ¶
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)