buffer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: MIT Imports: 2 Imported by: 30

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func New

func New() *Buffer

func (*Buffer) AddSubscriber

func (b *Buffer) AddSubscriber(host string, ch chan *Event) error

func (*Buffer) DelSubscriber

func (b *Buffer) DelSubscriber(host string) error

func (*Buffer) Publish

func (b *Buffer) Publish(event *Event)

func (*Buffer) Send

func (b *Buffer) Send(event *Event)

func (*Buffer) Start

func (b *Buffer) Start()

func (*Buffer) Stop

func (b *Buffer) Stop()

type Event

type Event struct {
	Source string  `json:"source,omitempty"`
	Offset int64   `json:"offset,omitempty"`
	Line   uint64  `json:"line,omitempty"`
	Text   *string `json:"text,omitempty"`
	Fields *map[string]interface{}
}

Taken from https://github.com/elasticsearch/logstash-forwarder/blob/master/event.go

type Sender

type Sender interface {
	AddSubscriber(string, chan *Event) error
	DelSubscriber(string) error
}

Jump to

Keyboard shortcuts

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