Documentation ¶
Overview ¶
Package supervisor provides supervisor for running Agents.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Supervisor ¶
type Supervisor struct {
// contains filtered or unexported fields
}
Supervisor manages all Agents, both processes and built-in.
func NewSupervisor ¶
NewSupervisor creates new Supervisor object.
Supervisor is gracefully stopped when context passed to NewSupervisor is canceled. Changes of Agent statuses are reported via Changes() channel which must be read until it is closed. QAN data is sent to QANRequests() channel which must be read until it is closed.
func (*Supervisor) AgentsList ¶
func (s *Supervisor) AgentsList() []*agentlocalpb.AgentInfo
AgentsList returns info for all Agents managed by this supervisor.
func (*Supervisor) Changes ¶
func (s *Supervisor) Changes() <-chan agentpb.StateChangedRequest
Changes returns channel with Agent's state changes.
func (*Supervisor) QANRequests ¶
func (s *Supervisor) QANRequests() <-chan agentpb.QANCollectRequest
QANRequests returns channel with Agent's QAN Collect requests.
func (*Supervisor) SetState ¶
func (s *Supervisor) SetState(state *agentpb.SetStateRequest)
SetState starts or updates all agents placed in args and stops all agents not placed in args, but already run.