monitor

package
v0.10.1-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentMonitor

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

func NewAgentMonitor

func NewAgentMonitor(chnl *channel.Channel, function func(context.Context, string, string) ([]*pbcom.Notification, error)) *AgentMonitor

func (*AgentMonitor) AddAgent

func (n *AgentMonitor) AddAgent(locationOrGroup, agent string) (err error)

AddAgent adds a corresponding callback to be called when a notification comes in for the corresponding operation

func (*AgentMonitor) RemoveAgent

func (n *AgentMonitor) RemoveAgent(agent string) (err error)

RemoveAgent

func (*AgentMonitor) Start

func (n *AgentMonitor) Start()

Start

func (*AgentMonitor) Stop

func (n *AgentMonitor) Stop() (err error)

Stop - the agent monitor and the corresponding goroutines

type NotificationMonitor

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

func NewNotificationMonitor

func NewNotificationMonitor(src, dst string, chnl *channel.Channel) *NotificationMonitor

func (*NotificationMonitor) AddCallback

func (n *NotificationMonitor) AddCallback(oper pbcom.Operation, cb func(context.Context, string, string) error) (err error)

AddCallback adds a corresponding callback to be called when a notification comes in for the corresponding operation

func (*NotificationMonitor) Start

func (n *NotificationMonitor) Start()

Start

func (*NotificationMonitor) Stop

func (n *NotificationMonitor) Stop() (err error)

Stop

Jump to

Keyboard shortcuts

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