emitter

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2016 License: Apache-2.0 Imports: 6 Imported by: 119

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorMissingOrigin = errors.New("Event not emitted due to missing origin information")
View Source
var ErrorUnknownEventType = errors.New("Cannot create envelope for unknown event type")

Functions

func Wrap

func Wrap(event events.Event, origin string) (*events.Envelope, error)

Types

type ByteEmitter

type ByteEmitter interface {
	Emit([]byte) error
	Close()
}

type EventEmitter

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

func NewEventEmitter

func NewEventEmitter(byteEmitter ByteEmitter, origin string) *EventEmitter

func (*EventEmitter) Close

func (e *EventEmitter) Close()

func (*EventEmitter) Emit

func (e *EventEmitter) Emit(event events.Event) error

func (*EventEmitter) EmitEnvelope

func (e *EventEmitter) EmitEnvelope(envelope *events.Envelope) error

func (*EventEmitter) Origin

func (e *EventEmitter) Origin() string

type UDPEmitter

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

func NewUdpEmitter

func NewUdpEmitter(remoteAddr string) (*UDPEmitter, error)

func (*UDPEmitter) Address

func (e *UDPEmitter) Address() net.Addr

func (*UDPEmitter) Close

func (e *UDPEmitter) Close()

func (*UDPEmitter) Emit

func (e *UDPEmitter) Emit(data []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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