Documentation ¶
Index ¶
- Constants
- func GetVolumeAPIRoutesWithAuth(name, sdkUds string, authProviderType secrets.AuthTokenProviders, ...) (*mux.Router, error)
- func NewAuthMiddleware(s osecrets.Secrets, authType secrets.AuthTokenProviders) (*authMiddleware, error)
- 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 ¶
This section is empty.
Functions ¶
func GetVolumeAPIRoutesWithAuth ¶
func GetVolumeAPIRoutesWithAuth( name, sdkUds string, authProviderType secrets.AuthTokenProviders, authProvider osecrets.Secrets, 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( s osecrets.Secrets, authType secrets.AuthTokenProviders, ) (*authMiddleware, error)
NewAuthMiddleware returns a negroni implementation of an http middleware which will intercept the management APIs
func StartClusterAPI ¶
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.
func StartVolumeMgmtAPI ¶
func StartVolumeMgmtAPI( name, sdkUds string, mgmtBase string, mgmtPort uint16, auth bool, authProviderType secrets.AuthTokenProviders, authProvider osecrets.Secrets, ) (*http.Server, *http.Server, error)
StartVolumeMgmtAPI starts a REST server to receive volume management API commands
func StartVolumePluginAPI ¶
func StartVolumePluginAPI( name, sdkUds string, pluginBase string, pluginPort uint16, authProviderType secrets.AuthTokenProviders, authProvider osecrets.Secrets, ) error
StartVolumePluginAPI starts a REST server to receive volume API 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 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