Documentation ¶
Index ¶
- Constants
- Variables
- func GetVolumeAPIRoutesWithAuth(name, sdkUds string, router *mux.Router, ...) (*mux.Router, error)
- func NewAuthMiddleware() *authMiddleware
- func SecurityHandler(authenticators map[string]auth.Authenticator, next http.HandlerFunc) http.HandlerFunc
- func SetClusterAPIRoutesWithAuth(router *mux.Router, authenticators map[string]auth.Authenticator) (*mux.Router, error)
- func SetCredsAPIRoutesWithAuth(router *mux.Router, authenticators map[string]auth.Authenticator) *mux.Router
- func StartClusterAPI(clusterApiBase string, clusterPort uint16, ...) error
- func StartGraphAPI(name string, restBase string) error
- func StartVolumeMgmtAPI(name, sdkUds string, mgmtBase string, mgmtPort uint16, auth bool, ...) (*http.Server, *http.Server, error)
- func StartVolumePluginAPI(name, sdkUds string, pluginBase string, pluginPort uint16) error
- type AnonRegex
- type Route
- type ServerRegisterRoute
Constants ¶
const ( // PVCNameLabelKey is used for kubernetes auth provider indicating the name of PVC PVCNameLabelKey = "pvc" // PVCNamespaceLabelKey is used for kubernetes auth provider indicating the namespace of the PVC PVCNamespaceLabelKey = "namespace" )
const (
// GraphDriver is the string returned in the handshake protocol.
GraphDriver = "GraphDriver"
)
const (
// VolumeDriver is the string returned in the handshake protocol.
VolumeDriver = "VolumeDriver"
)
Variables ¶
var (
// OverrideSchedDriverName is set by osd program to override the schedule driver
OverrideSchedDriverName = ""
)
Functions ¶
func GetVolumeAPIRoutesWithAuth ¶
func GetVolumeAPIRoutesWithAuth( name, sdkUds string, router *mux.Router, serverRegisterRoute ServerRegisterRoute, preRouteCheckFn func(http.ResponseWriter, *http.Request) bool, ) (*mux.Router, error)
GetVolumeAPIRoutesWithAuth returns a router with all the volume routes added to the router along with the auth middleware - preRouteCheckFn is a handler that gets executed before the actual volume handler is invoked. It is added for legacy support where negroni middleware was not used
func NewAuthMiddleware ¶
func NewAuthMiddleware() *authMiddleware
NewAuthMiddleware returns a negroni implementation of an http middleware which will intercept the management APIs
func SecurityHandler ¶
func SecurityHandler(authenticators map[string]auth.Authenticator, next http.HandlerFunc) http.HandlerFunc
SecurityHandler implements Authentication and Authorization check at the same time this functionality where not moved to separate functions because of simplicity
func StartClusterAPI ¶
func StartClusterAPI(clusterApiBase string, clusterPort uint16, authenticators map[string]auth.Authenticator) error
StartClusterAPI starts a REST server to receive driver configuration commands from the CLI/UX to control the OSD cluster.
func StartGraphAPI ¶
StartGraphAPI starts a REST server to receive GraphDriver commands from the Linux container engine.
Types ¶
type AnonRegex ¶
type AnonRegex struct {
// contains filtered or unexported fields
}
AnonRegex defines a regex replace for a string
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is a specification and handler for a REST endpoint.
func GetClusterAPIRoutes ¶
func GetClusterAPIRoutes() []*Route
func GetCredAPIRoutes ¶
func GetCredAPIRoutes() []*Route
func GetVolumeAPIRoutes ¶
GetVolumeAPIRoutes returns all the volume routes. A driver could use this function if it does not want openstorage to setup the REST server but it sets up its own and wants to add volume routes
type ServerRegisterRoute ¶
type ServerRegisterRoute func( routeFunc func(w http.ResponseWriter, r *http.Request), preRouteCheck func(w http.ResponseWriter, r *http.Request) bool, ) func(w http.ResponseWriter, r *http.Request)
ServerRegisterRoute is a callback function used by drivers to run their preRouteChecks before the actual volume route gets invoked This is added for legacy support before negroni middleware was added
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock is a generated GoMock package.
|
Package mock is a generated GoMock package. |
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
|
Package sdk is the gRPC implementation of the SDK gRPC server Copyright 2018 Portworx Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. |