driver

package
v1.0.7-1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2017 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//MountTimeout timeout before killing a mount try in seconds
	MountTimeout = 30
	//CfgVersion current config version compat
	CfgVersion = 1
	//CfgFolder config folder
	CfgFolder = "/etc/docker-volumes/gluster/"
)

Functions

This section is empty.

Types

type GlusterDriver

type GlusterDriver struct {
	// contains filtered or unexported fields
}

GlusterDriver the global driver responding to call

func Init

func Init(root string, mountUniqName bool) *GlusterDriver

Init start all needed deps and serve response to API call

func (*GlusterDriver) Capabilities

func (d *GlusterDriver) Capabilities() *volume.CapabilitiesResponse

Capabilities Send capabilities of the local driver

func (*GlusterDriver) Create

func (d *GlusterDriver) Create(r *volume.CreateRequest) error

Create create and init the requested volume

func (*GlusterDriver) Get

Get get info on the requested volume

func (*GlusterDriver) GetLock added in v1.0.7

func (d *GlusterDriver) GetLock() *sync.RWMutex

func (*GlusterDriver) GetMounts added in v1.0.7

func (d *GlusterDriver) GetMounts() map[string]common.Mount

func (*GlusterDriver) GetVolumes added in v1.0.7

func (d *GlusterDriver) GetVolumes() map[string]common.Volume

func (*GlusterDriver) List

func (d *GlusterDriver) List() (*volume.ListResponse, error)

List volumes handled by these driver

func (*GlusterDriver) Mount

Mount mount the requested volume

func (*GlusterDriver) Path

Path get path of the requested volume

func (*GlusterDriver) Remove

func (d *GlusterDriver) Remove(r *volume.RemoveRequest) error

Remove remove the requested volume

func (*GlusterDriver) RunCmd added in v1.0.7

func (d *GlusterDriver) RunCmd(cmd string) error

RunCmd run deamon in context of this gvfs drive with custome env

func (*GlusterDriver) SaveConfig added in v1.0.7

func (d *GlusterDriver) SaveConfig() error

SaveConfig stroe config/state in file //TODO put inside common

func (*GlusterDriver) Unmount

func (d *GlusterDriver) Unmount(r *volume.UnmountRequest) error

Unmount unmount the requested volume

type GlusterMountpoint added in v1.0.7

type GlusterMountpoint struct {
	Path        string `json:"path"`
	Connections int    `json:"connections"`
}

func (*GlusterMountpoint) GetConnections added in v1.0.7

func (d *GlusterMountpoint) GetConnections() int

func (*GlusterMountpoint) GetPath added in v1.0.7

func (d *GlusterMountpoint) GetPath() string

func (*GlusterMountpoint) SetConnections added in v1.0.7

func (d *GlusterMountpoint) SetConnections(n int)

type GlusterPersistence

type GlusterPersistence struct {
	Version int                           `json:"version"`
	Volumes map[string]*GlusterVolume     `json:"volumes"`
	Mounts  map[string]*GlusterMountpoint `json:"mounts"`
}

GlusterPersistence represent struct of persistence file

type GlusterVolume added in v1.0.7

type GlusterVolume struct {
	VolumeURI   string `json:"voluri"`
	Mount       string `json:"mount"`
	Connections int    `json:"connections"`
}

func (*GlusterVolume) GetConnections added in v1.0.7

func (v *GlusterVolume) GetConnections() int

func (*GlusterVolume) GetMount added in v1.0.7

func (v *GlusterVolume) GetMount() string

func (*GlusterVolume) GetRemote added in v1.0.7

func (v *GlusterVolume) GetRemote() string

func (*GlusterVolume) GetStatus added in v1.0.7

func (v *GlusterVolume) GetStatus() map[string]interface{}

func (*GlusterVolume) SetConnections added in v1.0.7

func (v *GlusterVolume) SetConnections(n int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL