api

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2014 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServeMux

func NewServeMux(reg registry.Registry) http.Handler

Types

type PageToken

type PageToken struct {
	Limit uint16
	Page  uint16
}

func DefaultPageToken

func DefaultPageToken() PageToken

func (PageToken) Encode

func (tok PageToken) Encode() string

func (PageToken) Next

func (tok PageToken) Next() PageToken

type Server added in v0.5.3

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

func NewServer added in v0.5.3

func NewServer(listeners []net.Listener, hdlr http.Handler) *Server

func (*Server) Available added in v0.5.3

func (s *Server) Available(stop chan bool)

Available switches the Server's HTTP handler from a generic 503 Unavailable response to the actual API. Once the provided channel is closed, the API is torn back down and 503 responses are served.

func (*Server) Serve added in v0.5.3

func (s *Server) Serve()

func (*Server) ServeHTTP added in v0.5.3

func (s *Server) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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