handlers

package
v0.0.0-...-78fb45d Latest Latest
Warning

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

Go to latest
Published: May 13, 2019 License: Apache-2.0 Imports: 18 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthHandler

func HealthHandler(ctx context.Context, w http.ResponseWriter, r *http.Request)

func HomeHandler

func HomeHandler(w http.ResponseWriter, r *http.Request)

func NewTokenHandler

func NewTokenHandler(ctx context.Context, w http.ResponseWriter, r *http.Request)

func RobotsHandler

func RobotsHandler(w http.ResponseWriter, r *http.Request)

func TokenHandler

func TokenHandler(ctx context.Context, w http.ResponseWriter, r *http.Request)

Types

type ContextAdapter

type ContextAdapter struct {
	Ctx     context.Context
	Handler ContextHandler
}

func (*ContextAdapter) ServeHTTP

func (ca *ContextAdapter) ServeHTTP(w http.ResponseWriter, req *http.Request)

type ContextHandler

type ContextHandler interface {
	ServeHTTPContext(context.Context, http.ResponseWriter, *http.Request)
}

func With

func With(h ContextHandler, st *State) ContextHandler

type ContextHandlerFunc

type ContextHandlerFunc func(context.Context, http.ResponseWriter, *http.Request)

func (ContextHandlerFunc) ServeHTTPContext

func (f ContextHandlerFunc) ServeHTTPContext(ctx context.Context, w http.ResponseWriter, req *http.Request)

type State

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

State is the discovery server configuration state shared between handlers.

func Setup

func Setup(etcdCURL, disc string) *State

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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