Documentation
¶
Index ¶
- Constants
- type DateraDriver
- func (d DateraDriver) Capabilities() *dv.CapabilitiesResponse
- func (d DateraDriver) Create(r *dv.CreateRequest) error
- func (d DateraDriver) Get(r *dv.GetRequest) (*dv.GetResponse, error)
- func (d DateraDriver) List() (*dv.ListResponse, error)
- func (d DateraDriver) Mount(r *dv.MountRequest) (*dv.MountResponse, error)
- func (d DateraDriver) MountPoint(name string) string
- func (d DateraDriver) Path(r *dv.PathRequest) (*dv.PathResponse, error)
- func (d DateraDriver) Remove(r *dv.RemoveRequest) error
- func (d DateraDriver) Unmount(r *dv.UnmountRequest) error
- type IClient
Constants ¶
View Source
const ( DefaultSize = 16 DefaultFS = "ext4" DefaultReplicas = 3 DefaultPlacement = "hybrid" DefaultPersistence = "manual" DriverVersion = "1.1.1" DRIVER = "Docker-Volume" // Volume Options OptSize = "size" OptReplica = "replica" OptTemplate = "template" OptFstype = "fsType" OptMaxiops = "maxIops" OptMaxbw = "maxBW" OptPlacement = "placementMode" OptPersistence = "persistenceMode" // TODO(mss): add a clone_src opt so we can specify a clone rather than a // new volume creation OptCloneSrc = "cloneSrcNotUsedYet" // V2 Volume Plugin static mounts must be under /mnt MountLoc = "/mnt" EnvFwk = "DATERA_FRAMEWORK" EnvSize = "DATERA_VOL_SIZE" EnvReplica = "DATERA_REPLICAS" EnvPlacement = "DATERA_PLACEMENT" EnvMaxiops = "DATERA_MAX_IOPS" EnvMaxbw = "DATERA_MAX_BW" EnvTemplate = "DATERA_TEMPLATE" EnvFstype = "DATERA_FSTYPE" EnvPersistence = "DATERA_PERSISTENCE" // Misc DeleteConst = "auto" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DateraDriver ¶
type DateraDriver struct {
DateraClient IClient
Volumes map[string]*co.VolObj
Mutex *sync.Mutex
Version string
Debug bool
Ssl bool
}
func NewDateraDriver ¶
func NewDateraDriver(restAddress, username, password, tenant string, debug, noSsl bool) DateraDriver
func (DateraDriver) Capabilities ¶
func (d DateraDriver) Capabilities() *dv.CapabilitiesResponse
func (DateraDriver) Create ¶
func (d DateraDriver) Create(r *dv.CreateRequest) error
Create creates a volume on the configured Datera backend
Specified using `--opt key=value` in the docker volume create command
Available Options:
size replica -- Default: 3 template fsType -- Default: ext4 maxIops maxBW placementMode -- Default: hybrid
func (DateraDriver) Get ¶
func (d DateraDriver) Get(r *dv.GetRequest) (*dv.GetResponse, error)
func (DateraDriver) List ¶
func (d DateraDriver) List() (*dv.ListResponse, error)
func (DateraDriver) Mount ¶
func (d DateraDriver) Mount(r *dv.MountRequest) (*dv.MountResponse, error)
func (DateraDriver) MountPoint ¶
func (d DateraDriver) MountPoint(name string) string
func (DateraDriver) Path ¶
func (d DateraDriver) Path(r *dv.PathRequest) (*dv.PathResponse, error)
func (DateraDriver) Remove ¶
func (d DateraDriver) Remove(r *dv.RemoveRequest) error
func (DateraDriver) Unmount ¶
func (d DateraDriver) Unmount(r *dv.UnmountRequest) error
type IClient ¶
type IClient interface {
VolumeExist(string) (bool, error)
CreateVolume(string, int, int, string, int, int, string) error
DeleteVolume(string, string) error
LoginVolume(string, string) (string, error)
MountVolume(string, string, string, string) error
UnmountVolume(string, string) error
DetachVolume(string) error
GetIQNandPortals(string) (string, []string, string, error)
FindDeviceFsType(string) (string, error)
}
Need to require interface instead of DateraClient directly so we can mock DateraClient out more easily
Click to show internal directories.
Click to hide internal directories.