eventmon

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTopic = "LOG"

	Info uint8 = iota
	Warn uint8 = iota
	Err  uint8 = iota
)

Variables

This section is empty.

Functions

func InitLogCollector

func InitLogCollector(eventBus *wire.EventBus) chan *Event

func LaunchLoggers

func LaunchLoggers(eventBus *wire.EventBus, l []Logger)

LaunchLoggers should do a plugin lookup and use the Connect method. For now, it accepts Loggers as a parameter and the plugging is delegated to the caller until the plugin system will be ready

Types

type Event

type Event struct {
	Msg        string
	Severity   uint8
	Originator string
	Time       time.Time
}

func NewEvent

func NewEvent(sender string) *Event

func (*Event) Equal

func (e *Event) Equal(ev wire.Event) bool

func (*Event) Sender

func (e *Event) Sender() []byte

type Logger

type Logger interface {
	Connect(<-chan *Event)
}

type UnMarshaller

type UnMarshaller struct{}

func (*UnMarshaller) Marshal

func (eu *UnMarshaller) Marshal(b *bytes.Buffer, e wire.Event) error

func (*UnMarshaller) Unmarshal

func (eu *UnMarshaller) Unmarshal(b *bytes.Buffer, e wire.Event) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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