supervisor

package
v2.15.1+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

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

func NewSupervisor(ctx context.Context, paths *config.Paths, ports *config.Ports, server *config.Server) *Supervisor

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL