Documentation ¶
Overview ¶
(c) Copyright 2017 Hewlett Packard Enterprise Development LP
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- type CapResponse
- type DockerVolume
- type DockerVolumePlugin
- func (dvp *DockerVolumePlugin) Capabilities() (*CapResponse, error)
- func (dvp *DockerVolumePlugin) Create(name string, options map[string]interface{}) (string, error)
- func (dvp *DockerVolumePlugin) Delete(name string, managerName string) error
- func (dvp *DockerVolumePlugin) Get(name string) (*GetResponse, error)
- func (dvp *DockerVolumePlugin) List() (*GetListResponse, error)
- func (dvp *DockerVolumePlugin) Mount(name, mountID string) (string, error)
- func (dvp *DockerVolumePlugin) Unmount(name, mountID string) error
- func (dvp *DockerVolumePlugin) Update(name string, options map[string]interface{}) (string, error)
- type Errorer
- type GetListResponse
- type GetResponse
- type MountRequest
- type MountResponse
- type Options
- type PluginCapabilities
- type Request
Constants ¶
const ( //ActivateURI is /Plugin.Activate ActivateURI = "/Plugin.Activate" //CreateURI is /VolumeDriver.Create CreateURI = "/VolumeDriver.Create" //UpdateURI = "/VolumeDriver.Update" UpdateURI = "/VolumeDriver.Update" //ListURI is /VolumeDriver.List ListURI = "/VolumeDriver.List" //CapabilitiesURI is /VolumeDriver.Capabilities CapabilitiesURI = "/VolumeDriver.Capabilities" //RemoveURI is /VolumeDriver.Remove RemoveURI = "/VolumeDriver.Remove" //MountURI is /VolumeDriver.Mount MountURI = "/VolumeDriver.Mount" //UnmountURI is /VolumeDriver.Unmount UnmountURI = "/VolumeDriver.Unmount" //GetURI is /VolumeDriver.Get GetURI = "/VolumeDriver.Get" //NotFound describes the beginning of the not found error message NotFound = "Unable to find" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapResponse ¶
type CapResponse struct {
Capabilities PluginCapabilities `json:"Capabilities,omitempty"`
}
CapResponse describes the capabilities of the plugin
type DockerVolume ¶
type DockerVolume struct { Name string `json:"Name,omitempty"` Mountpoint string `json:"Mountpoint,omitempty"` Status map[string]interface{} `json:"Status,omitempty"` }
DockerVolume represents the details about a docker volume
type DockerVolumePlugin ¶
type DockerVolumePlugin struct { ListOfStorageResourceOptions []string FactorForConversion int // contains filtered or unexported fields }
DockerVolumePlugin is the client to a specific docker volume plugin
func NewDockerVolumePlugin ¶
func NewDockerVolumePlugin(options *Options) (*DockerVolumePlugin, error)
NewDockerVolumePlugin creates a DockerVolumePlugin which can be used to communicate with a Docker Volume Plugin. options.socketPath can be the full path to the socket file or the name of a Docker V2 plugin. In the case of the V2 plugin, the name of th plugin is used to look up the full path to the socketfile.
func (*DockerVolumePlugin) Capabilities ¶
func (dvp *DockerVolumePlugin) Capabilities() (*CapResponse, error)
Capabilities returns the capabilities supported by the plugin
func (*DockerVolumePlugin) Create ¶
func (dvp *DockerVolumePlugin) Create(name string, options map[string]interface{}) (string, error)
Create a docker volume returning the docker volume name nolint Create and Update have same signature. For maintaining backward compatibility we need these two definitions
func (*DockerVolumePlugin) Delete ¶
func (dvp *DockerVolumePlugin) Delete(name string, managerName string) error
Delete calls the delete function of the plugin
func (*DockerVolumePlugin) Get ¶
func (dvp *DockerVolumePlugin) Get(name string) (*GetResponse, error)
Get a docker volume by docker name returning the response from the driver
func (*DockerVolumePlugin) List ¶
func (dvp *DockerVolumePlugin) List() (*GetListResponse, error)
List the docker volumes returning the response from the driver
func (*DockerVolumePlugin) Mount ¶
func (dvp *DockerVolumePlugin) Mount(name, mountID string) (string, error)
Mount attaches and mounts a nimble volume returning the path
func (*DockerVolumePlugin) Unmount ¶
func (dvp *DockerVolumePlugin) Unmount(name, mountID string) error
Unmount and detaches volume for maxTries
type Errorer ¶
type Errorer interface {
// contains filtered or unexported methods
}
Errorer describes the ability get the embedded error
type GetListResponse ¶
type GetListResponse struct { Volumes []DockerVolume `json:"Volumes,omitempty"` Err string `json:"Err,omitempty"` }
GetListResponse is returned from the volume driver list request
type GetResponse ¶
type GetResponse struct { Volume DockerVolume `json:"Volume,omitempty"` Err string `json:"Err,omitempty"` }
GetResponse is returned from the volume driver
type MountRequest ¶
MountRequest is used to mount and unmount volumes
type MountResponse ¶
type MountResponse struct { Mountpoint string `json:"Mountpoint,omitempty"` Err string `json:"Err,omitempty"` }
MountResponse is returned from the volume driver
type Options ¶
type Options struct { SocketPath string StripK8sFromOptions bool LogFilePath string Debug bool CreateVolumes bool ListOfStorageResourceOptions []string FactorForConversion int SupportsCapabilities bool }
Options for volumedriver
type PluginCapabilities ¶
type PluginCapabilities struct {
Scope string `json:"Scope,omitempty"`
}
PluginCapabilities includes the scope of the plugin