server

package
v0.0.0-...-be347a3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventDataKey = "data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	// Get the raw bytes of the event.
	GetEvent() common.MapStr
	// Get any metadata associated with the data that was received. Ex: client IP for udp message,
	// request/response headers for HTTP call.
	GetMeta() Meta
}

Event is an interface that can be used to get the event and event source related information.

type Meta

type Meta common.MapStr

type Server

type Server interface {
	// Start is used to start the server at a well defined port.
	Start() error
	// Stop the server.
	Stop()
	// Get a channel of events.
	GetEvents() chan Event
}

Server is an interface that can be used to implement servers which can accept data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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