Documentation ¶
Index ¶
- type Agent
- type AgentCmd
- func (a *AgentCmd) Descr() AgentDescr
- func (a *AgentCmd) Init()
- func (a *AgentCmd) InputToRingbuf(rErrors, rOutput *ringbuf.Ringbuf)
- func (a *AgentCmd) Kill() error
- func (a *AgentCmd) Meta() *AgentMetadata
- func (a *AgentCmd) OutputFromRingbuf(rStdout, rErrors, rOutput *ringbuf.Ringbuf, filter *msg.Filter)
- func (a *AgentCmd) Stop() error
- func (a *AgentCmd) String() string
- func (a *AgentCmd) WaitFinish() error
- type AgentDescr
- type AgentMessageResponse
- type AgentMessageResponseBool
- type AgentMessageResponseInt
- type AgentMessageResponseList
- type AgentMessageResponseString
- type AgentMetadata
- type AgentNull
- func (a *AgentNull) Descr() AgentDescr
- func (a *AgentNull) Init()
- func (a *AgentNull) InputToRingbuf(errors, output *ringbuf.Ringbuf)
- func (a *AgentNull) Kill() error
- func (a *AgentNull) Meta() *AgentMetadata
- func (a *AgentNull) OutputFromRingbuf(rStdout, rErrors, rOutput *ringbuf.Ringbuf, filter *msg.Filter)
- func (a *AgentNull) Stop() error
- func (a *AgentNull) String() string
- func (a *AgentNull) WaitFinish() error
- type AgentOptions
- type AgentPipe
- func (a *AgentPipe) Descr() AgentDescr
- func (a *AgentPipe) Init()
- func (a *AgentPipe) InputToRingbuf(rErrors, rOutput *ringbuf.Ringbuf)
- func (a *AgentPipe) Kill() error
- func (a *AgentPipe) Meta() *AgentMetadata
- func (a *AgentPipe) OutputFromRingbuf(rStdout, rErrors, rOutput *ringbuf.Ringbuf, filter *msg.Filter)
- func (a *AgentPipe) Stop() error
- func (a *AgentPipe) String() string
- func (a *AgentPipe) WaitFinish() error
- type AgentRole
- type AgentStatus
- type AgentType
- type Collection
- func (c *Collection) Add(a Agent, response AgentMessageResponse)
- func (c *Collection) Cancel(response AgentMessageResponse)
- func (c *Collection) Close()
- func (c *Collection) Finished(a Agent, response AgentMessageResponse)
- func (c *Collection) Kill(a Agent, response AgentMessageResponse)
- func (c *Collection) Len() int
- func (c *Collection) Less(i, j int) bool
- func (c *Collection) List(response AgentMessageResponse)
- func (c *Collection) Run(autorun bool)
- func (c *Collection) Start(a Agent, response AgentMessageResponse)
- func (c *Collection) StartAll(response AgentMessageResponse)
- func (c *Collection) Stop(a Agent, response AgentMessageResponse)
- func (c *Collection) Swap(i, j int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent interface { Init() // Gracefully stop an Agent. Stop() error // Forced stop of an Agent. Can be force onto stopped agents. Kill() error // Returns when the Agent is definitely finished and can be marked as such. WaitFinish() error String() string Meta() *AgentMetadata Descr() AgentDescr InputToRingbuf(errors, output *ringbuf.Ringbuf) OutputFromRingbuf(stdout, errors, output *ringbuf.Ringbuf, filter *msg.Filter) }
type AgentCmd ¶
type AgentCmd struct {
// contains filtered or unexported fields
}
func NewAgentCmd ¶
func NewAgentCmd(cmd []string, meta *AgentMetadata) *AgentCmd
func (*AgentCmd) Descr ¶
func (a *AgentCmd) Descr() AgentDescr
func (*AgentCmd) InputToRingbuf ¶
func (*AgentCmd) Meta ¶
func (a *AgentCmd) Meta() *AgentMetadata
func (*AgentCmd) OutputFromRingbuf ¶
func (*AgentCmd) WaitFinish ¶
type AgentDescr ¶
type AgentDescr struct { Args []string Meta AgentMetadata Type AgentType }
func (*AgentDescr) String ¶
func (a *AgentDescr) String() string
func (*AgentDescr) Text ¶
func (a *AgentDescr) Text() string
type AgentMessageResponse ¶
type AgentMessageResponseBool ¶
type AgentMessageResponseBool chan error
func NewAgentMessageResponseBool ¶
func NewAgentMessageResponseBool() AgentMessageResponseBool
func (AgentMessageResponseBool) Data ¶
func (r AgentMessageResponseBool) Data(interface{})
func (AgentMessageResponseBool) Err ¶
func (r AgentMessageResponseBool) Err(err error)
func (AgentMessageResponseBool) Get ¶
func (r AgentMessageResponseBool) Get() (interface{}, error)
func (AgentMessageResponseBool) Ok ¶
func (r AgentMessageResponseBool) Ok()
type AgentMessageResponseInt ¶
type AgentMessageResponseInt struct {
// contains filtered or unexported fields
}
func NewAgentMessageResponseInt ¶
func NewAgentMessageResponseInt() *AgentMessageResponseInt
func (*AgentMessageResponseInt) Data ¶
func (r *AgentMessageResponseInt) Data(i interface{})
func (*AgentMessageResponseInt) Err ¶
func (r *AgentMessageResponseInt) Err(err error)
func (*AgentMessageResponseInt) Get ¶
func (r *AgentMessageResponseInt) Get() (i interface{}, e error)
func (*AgentMessageResponseInt) Ok ¶
func (r *AgentMessageResponseInt) Ok()
type AgentMessageResponseList ¶
type AgentMessageResponseList struct { Agents *[]AgentDescr Error error // contains filtered or unexported fields }
func NewAgentMessageResponseList ¶
func NewAgentMessageResponseList() AgentMessageResponseList
func (*AgentMessageResponseList) Data ¶
func (r *AgentMessageResponseList) Data(data interface{})
func (*AgentMessageResponseList) Err ¶
func (r *AgentMessageResponseList) Err(err error)
func (*AgentMessageResponseList) Get ¶
func (r *AgentMessageResponseList) Get() (interface{}, error)
func (*AgentMessageResponseList) Ok ¶
func (r *AgentMessageResponseList) Ok()
type AgentMessageResponseString ¶
type AgentMessageResponseString struct {
// contains filtered or unexported fields
}
func NewAgentMessageResponseString ¶
func NewAgentMessageResponseString() AgentMessageResponseString
func (*AgentMessageResponseString) Data ¶
func (r *AgentMessageResponseString) Data(data interface{})
func (*AgentMessageResponseString) Err ¶
func (r *AgentMessageResponseString) Err(err error)
func (*AgentMessageResponseString) Get ¶
func (r *AgentMessageResponseString) Get() (interface{}, error)
func (*AgentMessageResponseString) Ok ¶
func (r *AgentMessageResponseString) Ok()
type AgentMetadata ¶
type AgentMetadata struct { ID int Role AgentRole Status AgentStatus Started time.Time Finished time.Time User string Name string Env []string Filter *msg.Filter Options *AgentOptions }
func NewAgentMetadata ¶
func NewAgentMetadata() *AgentMetadata
type AgentNull ¶
type AgentNull struct {
// contains filtered or unexported fields
}
func NewAgentNull ¶
func NewAgentNull(id int, meta *AgentMetadata) *AgentNull
func (*AgentNull) Descr ¶
func (a *AgentNull) Descr() AgentDescr
func (*AgentNull) InputToRingbuf ¶
func (*AgentNull) Meta ¶
func (a *AgentNull) Meta() *AgentMetadata
func (*AgentNull) OutputFromRingbuf ¶
func (*AgentNull) WaitFinish ¶
type AgentOptions ¶
type AgentPipe ¶
type AgentPipe struct {
// contains filtered or unexported fields
}
func NewAgentPipe ¶
func NewAgentPipe(pipeName string, meta *AgentMetadata) *AgentPipe
func (*AgentPipe) Descr ¶
func (a *AgentPipe) Descr() AgentDescr
func (*AgentPipe) InputToRingbuf ¶
func (*AgentPipe) Meta ¶
func (a *AgentPipe) Meta() *AgentMetadata
func (*AgentPipe) OutputFromRingbuf ¶
func (*AgentPipe) WaitFinish ¶
type AgentStatus ¶
type AgentStatus int
const ( AgentStatusNone AgentStatus = iota AgentStatusRunning AgentStatusKilled AgentStatusStopped AgentStatusFinished )
func (AgentStatus) IsRunning ¶
func (s AgentStatus) IsRunning() bool
func (AgentStatus) String ¶
func (s AgentStatus) String() string
func (AgentStatus) Text ¶
func (s AgentStatus) Text() string
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
func NewCollection ¶
func NewCollection() *Collection
func (*Collection) Add ¶
func (c *Collection) Add(a Agent, response AgentMessageResponse)
func (*Collection) Cancel ¶
func (c *Collection) Cancel(response AgentMessageResponse)
func (*Collection) Close ¶
func (c *Collection) Close()
func (*Collection) Finished ¶
func (c *Collection) Finished(a Agent, response AgentMessageResponse)
func (*Collection) Kill ¶
func (c *Collection) Kill(a Agent, response AgentMessageResponse)
func (*Collection) Len ¶
func (c *Collection) Len() int
Implement a sort.Interface that sorts by (role,started date) and prints.
func (*Collection) Less ¶
func (c *Collection) Less(i, j int) bool
func (*Collection) List ¶
func (c *Collection) List(response AgentMessageResponse)
func (*Collection) Run ¶
func (c *Collection) Run(autorun bool)
func (*Collection) Start ¶
func (c *Collection) Start(a Agent, response AgentMessageResponse)
func (*Collection) StartAll ¶
func (c *Collection) StartAll(response AgentMessageResponse)
func (*Collection) Stop ¶
func (c *Collection) Stop(a Agent, response AgentMessageResponse)
func (*Collection) Swap ¶
func (c *Collection) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.