monitor

package
v0.0.0-...-077b43f Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 25 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterWatcher

func RegisterWatcher(name string, factory func() Watcher)

Types

type Context

type Context interface {
	ZkZone() *zk.ZkZone
	StopChan() <-chan struct{}
	Inflight() *sync.WaitGroup
	InfluxAddr() string
	InfluxDB() string
	ExternalDir() string
}

Context is the context container that will be passed to plugin watchers.

type Monitor

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

Monitor is the engine that will start/stop plugin watchers. It itself is an implementation of Context.

func (*Monitor) ExternalDir

func (this *Monitor) ExternalDir() string

func (*Monitor) Inflight

func (this *Monitor) Inflight() *sync.WaitGroup

func (*Monitor) InfluxAddr

func (this *Monitor) InfluxAddr() string

func (*Monitor) InfluxDB

func (this *Monitor) InfluxDB() string

func (*Monitor) Init

func (this *Monitor) Init()

func (*Monitor) ServeForever

func (this *Monitor) ServeForever()

func (*Monitor) Start

func (this *Monitor) Start()

func (*Monitor) Stop

func (this *Monitor) Stop()

func (*Monitor) StopChan

func (this *Monitor) StopChan() <-chan struct{}

func (*Monitor) ZkZone

func (this *Monitor) ZkZone() *zk.ZkZone

type Setter

type Setter interface {
	Set(key string)
}

type Watcher

type Watcher interface {
	Init(Context)
	Run()
}

A Watcher is a plugin of monitor.

Jump to

Keyboard shortcuts

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