plexer

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2016 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package plexer provides the means to live publish or store stats. In pulse, influx is a BatchPublisher, and mist is a SinglePublisher.

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type BatchPublisher

type BatchPublisher func(MessageSet) error

type Message

type Message struct {
	ID   string
	Tags []string
	Data string
}

type MessageSet

type MessageSet struct {
	Tags     []string
	Messages []Message
}

type Plexer

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

func NewPlexer

func NewPlexer() *Plexer

func (*Plexer) AddBatcher

func (plex *Plexer) AddBatcher(name string, observer BatchPublisher)

func (*Plexer) AddObserver

func (plex *Plexer) AddObserver(name string, observer SinglePublisher)

func (*Plexer) Publish

func (plex *Plexer) Publish(messages MessageSet) error

func (*Plexer) PublishSingle

func (plex *Plexer) PublishSingle(id string, tags []string, data string) error

func (*Plexer) RemoveBatcher

func (plex *Plexer) RemoveBatcher(name string)

func (*Plexer) RemoveObserver

func (plex *Plexer) RemoveObserver(name string)

type SinglePublisher

type SinglePublisher func([]string, string) error

Jump to

Keyboard shortcuts

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