Documentation
¶
Overview ¶
Package routes holds a collection of optional genericapiserver http handlers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringFlagPutHandler ¶
func StringFlagPutHandler(setter StringFlagSetterFunc) http.HandlerFunc
StringFlagPutHandler wraps an http Handler to set string type flag.
Types ¶
type DebugFlags ¶
type DebugFlags struct {
}
DebugFlags adds handlers for flags under /debug/flags.
type DebugSocket ¶ added in v0.27.0
type DebugSocket struct {
// contains filtered or unexported fields
}
DebugSocket installs profiling and debugflag as a Unix-Domain socket.
func NewDebugSocket ¶ added in v0.27.0
func NewDebugSocket(path string) *DebugSocket
NewDebugSocket creates a new DebugSocket for the given path.
func (*DebugSocket) InstallDebugFlag ¶ added in v0.27.0
func (s *DebugSocket) InstallDebugFlag(flag string, handler func(http.ResponseWriter, *http.Request))
InstallDebugFlag installs debug flag endpoints in the socket.
func (*DebugSocket) InstallProfiling ¶ added in v0.27.0
func (s *DebugSocket) InstallProfiling()
InstallProfiling installs profiling endpoints in the socket.
type DefaultMetrics ¶
type DefaultMetrics struct{}
DefaultMetrics installs the default prometheus metrics handler
type Index ¶
type Index struct{}
Index provides a webservice for the http root / listing all known paths.
type IndexLister ¶
type IndexLister struct {
StatusCode int
PathProvider ListedPathProvider
}
IndexLister lists the available indexes with the status code provided
type ListedPathProvider ¶
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 ¶
type ListedPathProviders []ListedPathProvider
ListedPathProviders is a convenient way to combine multiple ListedPathProviders
func (ListedPathProviders) ListedPaths ¶
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.
type OpenAPI ¶
type OpenAPI struct {
Config *common.Config
V3Config *common.OpenAPIV3Config
}
OpenAPI installs spec endpoints for each web service.
type StringFlagSetterFunc ¶
type StringFlagSetterFunc func(string) (string, error)
StringFlagSetterFunc is a func used for setting string type flag.