apiserver: k8s.io/apiserver/pkg/server/routes Index | Files

package routes

import "k8s.io/apiserver/pkg/server/routes"

Package routes holds a collection of optional genericapiserver http handlers.

Index

Package Files

doc.go flags.go index.go metrics.go openapi.go profiling.go version.go

func StringFlagPutHandler Uses

func StringFlagPutHandler(setter StringFlagSetterFunc) http.HandlerFunc

StringFlagPutHandler wraps an http Handler to set string type flag.

type DebugFlags Uses

type DebugFlags struct {
}

DebugFlags adds handlers for flags under /debug/flags.

func (DebugFlags) Index Uses

func (f DebugFlags) Index(w http.ResponseWriter, r *http.Request)

Index responds with the `/debug/flags` request. For example, "/debug/flags/v" serves the "--v" flag. Index responds to a request for "/debug/flags/" with an HTML page listing the available flags.

func (DebugFlags) Install Uses

func (f DebugFlags) Install(c *mux.PathRecorderMux, flag string, handler func(http.ResponseWriter, *http.Request))

Install registers the APIServer's flags handler.

type DefaultMetrics Uses

type DefaultMetrics struct{}

DefaultMetrics installs the default prometheus metrics handler

func (DefaultMetrics) Install Uses

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

Install adds the DefaultMetrics handler

type Index Uses

type Index struct{}

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

func (Index) Install Uses

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

Install adds the Index webservice to the given mux.

type IndexLister Uses

type IndexLister struct {
    StatusCode   int
    PathProvider ListedPathProvider
}

IndexLister lists the available indexes with the status code provided

func (IndexLister) ServeHTTP Uses

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

ServeHTTP serves the available paths.

type ListedPathProvider Uses

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 Uses

type ListedPathProviders []ListedPathProvider

ListedPathProviders is a convenient way to combine multiple ListedPathProviders

func (ListedPathProviders) ListedPaths Uses

func (p ListedPathProviders) ListedPaths() []string

ListedPaths unions and sorts the included paths.

type MetricsWithReset Uses

type MetricsWithReset struct{}

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

func (MetricsWithReset) Install Uses

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

Install adds the MetricsWithReset handler

type OpenAPI Uses

type OpenAPI struct {
    Config *common.Config
}

OpenAPI installs spec endpoints for each web service.

func (OpenAPI) Install Uses

func (oa OpenAPI) Install(c *restful.Container, mux *mux.PathRecorderMux) (*handler.OpenAPIService, *spec.Swagger)

Install adds the SwaggerUI webservice to the given mux.

type Profiling Uses

type Profiling struct{}

Profiling adds handlers for pprof under /debug/pprof.

func (Profiling) Install Uses

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

Install adds the Profiling webservice to the given mux.

type StringFlagSetterFunc Uses

type StringFlagSetterFunc func(string) (string, error)

StringFlagSetterFunc is a func used for setting string type flag.

type Version Uses

type Version struct {
    Version *version.Info
}

Version provides a webservice with version information.

func (Version) Install Uses

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

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

Package routes imports 22 packages (graph) and is imported by 18 packages. Updated 2019-09-29. Refresh now. Tools for package owners.