server

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorResponse

func ErrorResponse(context string, err error, w http.ResponseWriter)

ErrorResponse answers a request with a JSON error

func ObjectResponse

func ObjectResponse(status int, object interface{}, w http.ResponseWriter) error

ObjectResponse answers a request with a JSON message containing an object

func StartServer

func StartServer(listen string, port int, m *balancer.Manager)

StartServer starts the server that exposes the internal balancer API

Types

type StandardResponse

type StandardResponse struct {
	Message string `json:"message"`
	ID      string `json:"_id,,omitempty"`
}

StandardResponse is a standard response message

Jump to

Keyboard shortcuts

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