agent

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAnalyzerStructClientPool added in v0.19.1

func NewAnalyzerStructClientPool(authOptions *shttp.AuthenticationOpts) (*ws.StructClientPool, error)

NewAnalyzerStructClientPool creates a new http WebSocket client Pool with authentification

func NewTopologyProbeBundleFromConfig added in v0.9.0

func NewTopologyProbeBundleFromConfig(g *graph.Graph, n *graph.Node) (*probe.ProbeBundle, error)

NewTopologyProbeBundleFromConfig creates a new topology probe.ProbeBundle based on the configuration

Types

type Agent

type Agent struct {
	ws.DefaultSpeakerEventHandler
	// contains filtered or unexported fields
}

Agent object started on each hosts/namespaces

func NewAgent

func NewAgent() (*Agent, error)

NewAgent instanciates a new Agent aiming to launch probes (topology and flow)

func (*Agent) GetStatus added in v0.16.0

func (a *Agent) GetStatus() interface{}

GetStatus returns the status of an agent

func (*Agent) Start

func (a *Agent) Start()

Start the agent services

func (*Agent) Stop

func (a *Agent) Stop()

Stop agent services

type AnalyzerConnStatus added in v0.16.0

type AnalyzerConnStatus struct {
	ws.ConnStatus
	IsMaster bool
}

AnalyzerConnStatus represents the status of a connection to an analyzer

type CPUInfo added in v0.16.0

type CPUInfo struct {
	CPU        int64
	VendorID   string `json:"VendorID,omitempty"`
	Family     string `json:"Family,omitempty"`
	Model      string `json:"Model,omitempty"`
	Stepping   int64  `json:"Stepping,omitempty"`
	PhysicalID string `json:"PhysicalID,omitempty"`
	CoreID     string `json:"CoreID,omitempty"`
	Cores      int64  `json:"Cores,omitempty"`
	ModelName  string `json:"ModelName,omitempty"`
	Mhz        int64  `json:"Mhz,omitempty"`
	CacheSize  int64  `json:"CacheSize,omitempty"`
	Microcode  string `json:"Microcode,omitempty"`
}

CPUInfo defines host information

type Status added in v0.20.1

type Status struct {
	Clients        map[string]ws.ConnStatus
	Analyzers      map[string]AnalyzerConnStatus
	TopologyProbes []string
	FlowProbes     []string
}

Status represents the status of an agent

type TopologyForwarder added in v0.16.0

type TopologyForwarder struct {
	// contains filtered or unexported fields
}

TopologyForwarder forwards the topology to only one master server. When switching from one analyzer to another one the agent does a full re-sync since some messages could have been lost.

func NewTopologyForwarder added in v0.16.0

func NewTopologyForwarder(host string, g *graph.Graph, pool ws.StructSpeakerPool) *TopologyForwarder

NewTopologyForwarder returns a new Graph forwarder which forwards event of the given graph to the given WebSocket JSON speakers.

func NewTopologyForwarderFromConfig added in v0.16.0

func NewTopologyForwarderFromConfig(g *graph.Graph, pool ws.StructSpeakerPool) *TopologyForwarder

NewTopologyForwarderFromConfig creates a TopologyForwarder from configuration

func (*TopologyForwarder) GetMaster added in v0.16.0

func (t *TopologyForwarder) GetMaster() ws.Speaker

GetMaster returns the current analyzer the agent is sending its events to

func (*TopologyForwarder) OnEdgeAdded added in v0.16.0

func (t *TopologyForwarder) OnEdgeAdded(e *graph.Edge)

OnEdgeAdded graph edge added event. Implements the GraphEventListener interface.

func (*TopologyForwarder) OnEdgeDeleted added in v0.16.0

func (t *TopologyForwarder) OnEdgeDeleted(e *graph.Edge)

OnEdgeDeleted graph edge deleted event. Implements the GraphEventListener interface.

func (*TopologyForwarder) OnEdgeUpdated added in v0.16.0

func (t *TopologyForwarder) OnEdgeUpdated(e *graph.Edge)

OnEdgeUpdated graph edge updated event. Implements the GraphEventListener interface.

func (*TopologyForwarder) OnNewMaster added in v0.16.0

func (t *TopologyForwarder) OnNewMaster(c ws.Speaker)

OnNewMaster is called by the master election mechanism when a new master is elected. In such case a "Re-sync" is triggerd in order to be in sync with the new master.

func (*TopologyForwarder) OnNodeAdded added in v0.16.0

func (t *TopologyForwarder) OnNodeAdded(n *graph.Node)

OnNodeAdded graph node added event. Implements the GraphEventListener interface.

func (*TopologyForwarder) OnNodeDeleted added in v0.16.0

func (t *TopologyForwarder) OnNodeDeleted(n *graph.Node)

OnNodeDeleted graph node deleted event. Implements the GraphEventListener interface.

func (*TopologyForwarder) OnNodeUpdated added in v0.16.0

func (t *TopologyForwarder) OnNodeUpdated(n *graph.Node)

OnNodeUpdated graph node updated event. Implements the GraphEventListener interface.

Source Files

  • agent.go
  • host.go
  • host_linux.go
  • probes.go
  • topology_forwarder.go

Jump to

Keyboard shortcuts

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