endpoint

package
v0.0.0-...-96398ca Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

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

Endpoint is a configuration object representing the IP address, port and route for this service's REST endpoint.

func NewEndpoint

func NewEndpoint(addr string, port uint, route string) Endpoint

NewEndpoint returns a new Endpoint object to be used for serving an HTTP REST endpoint with the user specified parameters.

func (*Endpoint) Run

func (e *Endpoint) Run()

Run the HTTP REST endpoint given the endpoint configuration object.

func (*Endpoint) ServeHTTP

func (e *Endpoint) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves a given request routing it to the appropriate router given the requested endpoint.

func (*Endpoint) Setup

func (e *Endpoint) Setup()

Setup the HTTP REST endpoint given the user specified options.

Jump to

Keyboard shortcuts

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