routes

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2017 License: Apache-2.0, Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package routes holds a collection of optional genericapiserver http handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultMetrics

type DefaultMetrics struct{}

DefaultMetrics installs the default prometheus metrics handler

func (DefaultMetrics) Install

func (m DefaultMetrics) Install(c *mux.PathRecorderMux)

Install adds the DefaultMetrics handler

type Index

type Index struct{}

Index provides a webservice for the http root / listing all known paths.

func (Index) Install

func (i Index) Install(pathProvider ListedPathProvider, mux *mux.PathRecorderMux)

Install adds the Index webservice to the given mux.

type IndexLister added in v1.7.0

type IndexLister struct {
	StatusCode   int
	PathProvider ListedPathProvider
}

IndexLister lists the available indexes with the status code provided

func (IndexLister) ServeHTTP added in v1.7.0

func (i IndexLister) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves the available paths.

type ListedPathProvider added in v1.7.0

type ListedPathProvider interface {
	// ListedPaths is an alphabetically sorted list of paths to be reported at /.
	ListedPaths() []string
}

ListedPathProvider is an interface for providing paths that should be reported at /.

type ListedPathProviders added in v1.7.0

type ListedPathProviders []ListedPathProvider

ListedPathProviders is a convenient way to combine multiple ListedPathProviders

func (ListedPathProviders) ListedPaths added in v1.7.0

func (p ListedPathProviders) ListedPaths() []string

ListedPaths unions and sorts the included paths.

type MetricsWithReset

type MetricsWithReset struct{}

MetricsWithReset install the prometheus metrics handler extended with support for the DELETE method which resets the metrics.

func (MetricsWithReset) Install

func (m MetricsWithReset) Install(c *mux.PathRecorderMux)

Install adds the MetricsWithReset handler

type OpenAPI

type OpenAPI struct {
	Config *common.Config
}

OpenAPI installs spec endpoints for each web service.

func (OpenAPI) Install

func (oa OpenAPI) Install(c *restful.Container, mux *mux.PathRecorderMux)

Install adds the SwaggerUI webservice to the given mux.

type Profiling

type Profiling struct{}

Profiling adds handlers for pprof under /debug/pprof.

func (Profiling) Install

func (d Profiling) Install(c *mux.PathRecorderMux)

Install adds the Profiling webservice to the given mux.

type Swagger

type Swagger struct {
	Config *swagger.Config
}

Swagger installs the /swaggerapi/ endpoint to allow schema discovery and traversal. It is optional to allow consumers of the Kubernetes GenericAPIServer to register their own web services into the Kubernetes mux prior to initialization of swagger, so that other resource types show up in the documentation.

func (Swagger) Install

func (s Swagger) Install(c *restful.Container)

Install adds the SwaggerUI webservice to the given mux.

type SwaggerUI

type SwaggerUI struct{}

SwaggerUI exposes files in third_party/swagger-ui/ under /swagger-ui.

func (SwaggerUI) Install

func (l SwaggerUI) Install(c *mux.PathRecorderMux)

Install adds the SwaggerUI webservice to the given mux.

type Version

type Version struct {
	Version *version.Info
}

Version provides a webservice with version information.

func (Version) Install

func (v Version) Install(c *restful.Container)

Install registers the APIServer's `/version` handler.

Directories

Path Synopsis
data

Jump to

Keyboard shortcuts

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