web

package
v0.0.0-...-f267496 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler contains everything needed to start the HTTP service.

func New

func New(o *Options) *Handler

New initializes a new Handler.

func (*Handler) ErrorCh

func (h *Handler) ErrorCh() <-chan error

ErrorCh returns a channel where the web handler errors go to.

func (*Handler) Run

func (h *Handler) Run()

Run serves the HTTP endpoints.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

ServeHTTP implements the Handler interface.

type Options

type Options struct {
	ListenAddress string
	ReadTimeout   time.Duration
	WriteTimeout  time.Duration

	Verbose bool
}

Options contains parameters for the web handler.

Jump to

Keyboard shortcuts

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