listener

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventPipe    = "/pipes/events"
	ResponsePipe = "/pipes/response"
)

Event sidecar pipe files

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPListener

type HTTPListener struct {
	SharedListener
	// contains filtered or unexported fields
}

HTTPListener implements EventListener using HTTP server

func NewHTTP

func NewHTTP(shared SharedListener, port int) (*HTTPListener, error)

NewHTTP creates new HTTP Listener

func (*HTTPListener) Serve

func (l *HTTPListener) Serve() error

Serve starts serving loop. Blocks until Shutdown() is called.

func (*HTTPListener) ServeHTTP

func (l *HTTPListener) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HTTPListener) Shutdown

func (l *HTTPListener) Shutdown() error

Shutdown gracefully shuts down the server.

type PipeListener

type PipeListener struct {
}

PipeListener type for event pipe channels

func NewPipe

func NewPipe() (*PipeListener, error)

NewPipe creates a new PipeListener - TODO: finish me

type SharedListener

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

SharedListener serves as a simple DI container for Listener.

func NewSharedListener

func NewSharedListener(transport events.Transport, parser events.StreamParser, validator events.Validator, organization, driverType string) SharedListener

NewSharedListener creates new copy of SharedListener. It should not be used directly outside of the listener package.

Jump to

Keyboard shortcuts

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