mrms

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2016 License: AGPL-3.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

View Source
const (
	SERVICE_NAME     = "mrms"
	MONITOR_INTERVAL = 50 * time.Second
)
View Source
const MONITOR_NAME = "mrm-monitor"

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

type Checker interface {
	Check() (bool, error)
}

type Manager

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

func NewManager

func NewManager(logger *pct.Logger, monitor Monitor) *Manager

func (*Manager) GetConfig

func (m *Manager) GetConfig() ([]proto.AgentConfig, []error)

func (*Manager) GetDefaults

func (m *Manager) GetDefaults() map[string]interface{}

func (*Manager) Handle

func (m *Manager) Handle(cmd *proto.Cmd) *proto.Reply

func (*Manager) Start

func (m *Manager) Start() error

func (*Manager) Status

func (m *Manager) Status() (status map[string]string)

func (*Manager) Stop

func (m *Manager) Stop() error

type Monitor

type Monitor interface {
	Start(interval time.Duration) error
	Stop() error
	Status() map[string]string
	Add(proto.Instance) chan proto.Instance
	Remove(string, chan proto.Instance)
	ListenerCount(uuid string) uint
	Check()
}

type RealMonitor

type RealMonitor struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewRealMonitor

func NewRealMonitor(logger *pct.Logger, mysqlConnFactory mysql.ConnectionFactory) *RealMonitor

func (*RealMonitor) Add

func (m *RealMonitor) Add(in proto.Instance) chan proto.Instance

func (*RealMonitor) Check

func (m *RealMonitor) Check()

func (*RealMonitor) ListenerCount

func (m *RealMonitor) ListenerCount(uuid string) uint

func (*RealMonitor) Remove

func (m *RealMonitor) Remove(uuid string, c chan proto.Instance)

func (*RealMonitor) Start

func (m *RealMonitor) Start(interval time.Duration) error

func (*RealMonitor) Status

func (m *RealMonitor) Status() map[string]string

func (*RealMonitor) Stop

func (m *RealMonitor) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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