emitter

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 6 Imported by: 33 modules, 138 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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