servers

package
v0.0.0-...-c5b96c6 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

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

Base handler type

func NewBase

func NewBase(name string, handler http.Handler, options *options.Base) Base

NewBase creates a new base handler TODO: should this take an http.handler OR a more processed (ie. pre-read) object?

type HTTP

type HTTP struct {
	Base
	// contains filtered or unexported fields
}

HTTP is an HTTP server based http handler

func NewHTTP

func NewHTTP(o *options.Base, h http.Handler) *HTTP

NewHTTP creates a new HTTP server with the provided options

func (*HTTP) Close

func (s *HTTP) Close()

Close exits a server instance

func (*HTTP) Run

func (s *HTTP) Run()

Run starts a server instance (this only returns on error or exit)

func (*HTTP) Start

func (s *HTTP) Start()

type Handler

type Handler interface {
	Run()
	Close()
}

Handler run interface

type Lambda

type Lambda struct {
	Base
}

Lambda is an AWS Lambda based http handler

func NewLambda

func NewLambda(o *options.Base, handler http.Handler) *Lambda

NewLambda creates a new lambda handler with the given http handler func

func (*Lambda) Close

func (h *Lambda) Close()

Close stub to fulfil interface

func (*Lambda) Run

func (h *Lambda) Run()

Run starts a lambda server instance

Jump to

Keyboard shortcuts

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