Documentation ¶
Index ¶
- func AddBackend(w http.ResponseWriter, r *http.Request)
- func AddGeneric(w http.ResponseWriter, r *http.Request, response addResponse, add func([]byte))
- func AddStorageClass(w http.ResponseWriter, r *http.Request)
- func AddVolume(w http.ResponseWriter, r *http.Request)
- func DeleteBackend(w http.ResponseWriter, r *http.Request)
- func DeleteGeneric(w http.ResponseWriter, r *http.Request, d deleteFunc, varName string)
- func DeleteStorageClass(w http.ResponseWriter, r *http.Request)
- func DeleteVolume(w http.ResponseWriter, r *http.Request)
- func GetBackend(w http.ResponseWriter, r *http.Request)
- func GetGeneric(w http.ResponseWriter, r *http.Request, varName string, response interface{}, ...)
- func GetGenericNoArg(w http.ResponseWriter, r *http.Request, response interface{}, get func() int)
- func GetStorageClass(w http.ResponseWriter, r *http.Request)
- func GetVersion(w http.ResponseWriter, r *http.Request)
- func GetVolume(w http.ResponseWriter, r *http.Request)
- func ListBackends(w http.ResponseWriter, r *http.Request)
- func ListGeneric(w http.ResponseWriter, r *http.Request, response listResponse, ...)
- func ListStorageClasses(w http.ResponseWriter, r *http.Request)
- func ListVolumes(w http.ResponseWriter, r *http.Request)
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter() *mux.Router
- type APIServer
- type AddBackendResponse
- type AddStorageClassResponse
- type AddVolumeResponse
- type DeleteResponse
- type FakeTridentClient
- func (client *FakeTridentClient) AddStorageClass(storageClassConfig *storage_class.Config) (*AddStorageClassResponse, error)
- func (client *FakeTridentClient) AddVolume(volConfig *storage.VolumeConfig) (*AddVolumeResponse, error)
- func (client *FakeTridentClient) Configure(ip string, port, timeout int) Interface
- func (client *FakeTridentClient) Delete(endpoint string) (*http.Response, error)
- func (client *FakeTridentClient) DeleteVolume(volName string) (*DeleteResponse, error)
- func (client *FakeTridentClient) Get(endpoint string) (*http.Response, error)
- func (client *FakeTridentClient) GetBackend(backendID string) (*GetBackendResponse, error)
- func (client *FakeTridentClient) GetVolume(volName string) (*GetVolumeResponse, error)
- func (client *FakeTridentClient) ListBackends() (*ListBackendsResponse, error)
- func (client *FakeTridentClient) Post(endpoint string, body io.Reader) (*http.Response, error)
- func (client *FakeTridentClient) PostBackend(backendFile string) (*AddBackendResponse, error)
- type GetBackendResponse
- type GetStorageClassResponse
- type GetVersionResponse
- type GetVolumeResponse
- type Interface
- type ListBackendsResponse
- type ListStorageClassesResponse
- type ListVolumesResponse
- type RESTInterface
- type Route
- type Routes
- type TridentClient
- func (client *TridentClient) AddStorageClass(storageClassConfig *storage_class.Config) (*AddStorageClassResponse, error)
- func (client *TridentClient) AddVolume(volConfig *storage.VolumeConfig) (*AddVolumeResponse, error)
- func (client *TridentClient) Configure(ip string, port, timeout int) Interface
- func (client *TridentClient) Delete(endpoint string) (*http.Response, error)
- func (client *TridentClient) DeleteVolume(volName string) (*DeleteResponse, error)
- func (client *TridentClient) Get(endpoint string) (*http.Response, error)
- func (client *TridentClient) GetBackend(backendID string) (*GetBackendResponse, error)
- func (client *TridentClient) GetVolume(volName string) (*GetVolumeResponse, error)
- func (client *TridentClient) ListBackends() (*ListBackendsResponse, error)
- func (client *TridentClient) Post(endpoint string, body io.Reader) (*http.Response, error)
- func (client *TridentClient) PostBackend(backendFile string) (*AddBackendResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddBackend ¶
func AddBackend(w http.ResponseWriter, r *http.Request)
func AddGeneric ¶
func AddGeneric( w http.ResponseWriter, r *http.Request, response addResponse, add func([]byte), )
func AddStorageClass ¶
func AddStorageClass(w http.ResponseWriter, r *http.Request)
func DeleteBackend ¶
func DeleteBackend(w http.ResponseWriter, r *http.Request)
DeleteBackend calls OfflineBackend in the orchestrator, as we currently do not allow for full deletion of backends due to the potential for race conditions and the additional bookkeeping that would be required.
func DeleteGeneric ¶
func DeleteGeneric( w http.ResponseWriter, r *http.Request, d deleteFunc, varName string, )
func DeleteStorageClass ¶
func DeleteStorageClass(w http.ResponseWriter, r *http.Request)
func DeleteVolume ¶
func DeleteVolume(w http.ResponseWriter, r *http.Request)
func GetBackend ¶
func GetBackend(w http.ResponseWriter, r *http.Request)
func GetGeneric ¶
func GetGenericNoArg ¶
func GetGenericNoArg(w http.ResponseWriter, r *http.Request, response interface{}, get func() int, )
func GetStorageClass ¶
func GetStorageClass(w http.ResponseWriter, r *http.Request)
func GetVersion ¶
func GetVersion(w http.ResponseWriter, r *http.Request)
func ListBackends ¶
func ListBackends(w http.ResponseWriter, r *http.Request)
func ListGeneric ¶
func ListGeneric( w http.ResponseWriter, r *http.Request, response listResponse, lister func() []string, )
func ListStorageClasses ¶
func ListStorageClasses(w http.ResponseWriter, r *http.Request)
func ListVolumes ¶
func ListVolumes(w http.ResponseWriter, r *http.Request)
Types ¶
type APIServer ¶
type APIServer struct {
// contains filtered or unexported fields
}
func NewAPIServer ¶
func NewAPIServer(p core.Orchestrator, address, port string) *APIServer
func (*APIServer) Deactivate ¶
type AddBackendResponse ¶
type AddStorageClassResponse ¶
type AddVolumeResponse ¶
type DeleteResponse ¶
type DeleteResponse struct {
Error string `json:"error,omitempty"`
}
type FakeTridentClient ¶
type FakeTridentClient struct {
// contains filtered or unexported fields
}
func NewFakeTridentClient ¶
func NewFakeTridentClient(failMatrix map[string]bool) *FakeTridentClient
func (*FakeTridentClient) AddStorageClass ¶
func (client *FakeTridentClient) AddStorageClass(storageClassConfig *storage_class.Config) (*AddStorageClassResponse, error)
func (*FakeTridentClient) AddVolume ¶
func (client *FakeTridentClient) AddVolume(volConfig *storage.VolumeConfig) (*AddVolumeResponse, error)
func (*FakeTridentClient) Configure ¶
func (client *FakeTridentClient) Configure(ip string, port, timeout int) Interface
func (*FakeTridentClient) Delete ¶
func (client *FakeTridentClient) Delete(endpoint string) (*http.Response, error)
func (*FakeTridentClient) DeleteVolume ¶
func (client *FakeTridentClient) DeleteVolume(volName string) (*DeleteResponse, error)
func (*FakeTridentClient) Get ¶
func (client *FakeTridentClient) Get(endpoint string) (*http.Response, error)
func (*FakeTridentClient) GetBackend ¶
func (client *FakeTridentClient) GetBackend(backendID string) (*GetBackendResponse, error)
func (*FakeTridentClient) GetVolume ¶
func (client *FakeTridentClient) GetVolume(volName string) (*GetVolumeResponse, error)
func (*FakeTridentClient) ListBackends ¶
func (client *FakeTridentClient) ListBackends() (*ListBackendsResponse, error)
func (*FakeTridentClient) PostBackend ¶
func (client *FakeTridentClient) PostBackend(backendFile string) (*AddBackendResponse, error)
type GetBackendResponse ¶
type GetBackendResponse struct { Backend *storage.StorageBackendExternal `json:"backend"` Error string `json:"error,omitempty"` }
type GetStorageClassResponse ¶
type GetStorageClassResponse struct { StorageClass *storage_class.StorageClassExternal `json:"storageClass"` Error string `json:"error,omitempty"` }
type GetVersionResponse ¶
type GetVolumeResponse ¶
type GetVolumeResponse struct { Volume *storage.VolumeExternal `json:"volume"` Error string `json:"error,omitempty"` }
type Interface ¶
type Interface interface { RESTInterface Configure(ip string, port, timeout int) Interface GetBackend(backendID string) (*GetBackendResponse, error) PostBackend(backendFile string) (*AddBackendResponse, error) ListBackends() (*ListBackendsResponse, error) AddStorageClass(storageClassConfig *storage_class.Config) (*AddStorageClassResponse, error) GetVolume(volName string) (*GetVolumeResponse, error) AddVolume(volConfig *storage.VolumeConfig) (*AddVolumeResponse, error) DeleteVolume(volName string) (*DeleteResponse, error) }
type ListBackendsResponse ¶
type ListVolumesResponse ¶
type RESTInterface ¶
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
type TridentClient ¶
type TridentClient struct {
// contains filtered or unexported fields
}
func NewTridentClient ¶
func NewTridentClient(ip string, port, timeout int) *TridentClient
func (*TridentClient) AddStorageClass ¶
func (client *TridentClient) AddStorageClass(storageClassConfig *storage_class.Config) (*AddStorageClassResponse, error)
func (*TridentClient) AddVolume ¶
func (client *TridentClient) AddVolume(volConfig *storage.VolumeConfig) (*AddVolumeResponse, error)
func (*TridentClient) Configure ¶
func (client *TridentClient) Configure(ip string, port, timeout int) Interface
func (*TridentClient) Delete ¶
func (client *TridentClient) Delete(endpoint string) (*http.Response, error)
func (*TridentClient) DeleteVolume ¶
func (client *TridentClient) DeleteVolume(volName string) (*DeleteResponse, error)
func (*TridentClient) Get ¶
func (client *TridentClient) Get(endpoint string) (*http.Response, error)
func (*TridentClient) GetBackend ¶
func (client *TridentClient) GetBackend(backendID string) (*GetBackendResponse, error)
func (*TridentClient) GetVolume ¶
func (client *TridentClient) GetVolume(volName string) (*GetVolumeResponse, error)
func (*TridentClient) ListBackends ¶
func (client *TridentClient) ListBackends() (*ListBackendsResponse, error)
func (*TridentClient) PostBackend ¶
func (client *TridentClient) PostBackend(backendFile string) (*AddBackendResponse, error)
Click to show internal directories.
Click to hide internal directories.