server

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2017 License: MPL-2.0 Imports: 8 Imported by: 1

Documentation

Overview

Package server handles the tcp socket api for interacting with clients(relays). It also handles polling clients based on registered tags.

Index

Constants

This section is empty.

Variables

View Source
var (
	MissingPublisher = errors.New("A publisher is needed")
)

Functions

func Listen

func Listen(address string, publisher Publisher) error

Listen starts the pulse tcp socket api (stats)

func Poll

func Poll(tags []string)

Poll polls based on tags

func PollAll

func PollAll()

PollAll polls all clients for registered collectors(stats to be collected)

func StartPolling

func StartPolling(ids, tags []string, interval time.Duration, done chan struct{})

StartPolling polls clients at preconfigured interval. Examples:

StartPolling(nil, nil, 60, nil)
StartPolling(nil, []string{"cpu"}, 1, ch)
StartPolling([]string{"computer1", "computer2"}, []string{"cpu"}, 1, ch)

Types

type Publisher

type Publisher func(plexer.MessageSet) error

Jump to

Keyboard shortcuts

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