Documentation ¶
Index ¶
- func HideRoot() error
- func UnhideRoot() error
- type Driver
- func (p *Driver) Capabilities() *volume.CapabilitiesResponse
- func (p *Driver) Close()
- func (p *Driver) Create(req *volume.CreateRequest) error
- func (p *Driver) Get(req *volume.GetRequest) (*volume.GetResponse, error)
- func (p *Driver) Init(callback DriverCallback)
- func (p *Driver) List() (*volume.ListResponse, error)
- func (p *Driver) Mount(req *volume.MountRequest) (*volume.MountResponse, error)
- func (p *Driver) Path(req *volume.PathRequest) (*volume.PathResponse, error)
- func (p *Driver) Remove(req *volume.RemoveRequest) error
- func (p *Driver) ServeUnix()
- func (p *Driver) Unmount(req *volume.UnmountRequest) error
- type DriverCallback
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HideRoot ¶
func HideRoot() error
HideRoot hides the root folder by performing a mount of a tmpfs on top of the /root folder.
func UnhideRoot ¶
func UnhideRoot() error
UnhideRoot unhides the root folder by performing a unmount of the tmpfs that is on top of the /root folder.
Types ¶
type Driver ¶
type Driver struct { DriverCallback // contains filtered or unexported fields }
Driver extends the volume.Driver by implementing template versions of the methods.
func NewDriver ¶
func NewDriver(mountExecutable string, mountPointAfterOptions bool, dockerSocketName string, scope string) *Driver
NewDriver constructor for Driver
func (*Driver) Capabilities ¶
func (p *Driver) Capabilities() *volume.CapabilitiesResponse
Capabilities indicate to the swarm manager that this supports global scope.
func (*Driver) Create ¶
func (p *Driver) Create(req *volume.CreateRequest) error
Create attempts to create the volume, if it has been created already it will return an error if it is already present.
func (*Driver) Get ¶
func (p *Driver) Get(req *volume.GetRequest) (*volume.GetResponse, error)
Get obtain information for specific single volume.
func (*Driver) Init ¶
func (p *Driver) Init(callback DriverCallback)
Init sets the callback handler to the driver. This needs to be called before ServeUnix()
func (*Driver) List ¶
func (p *Driver) List() (*volume.ListResponse, error)
List obtain information for all volumes registered.
func (*Driver) Mount ¶
func (p *Driver) Mount(req *volume.MountRequest) (*volume.MountResponse, error)
Mount performs the mount operation. This will invoke the mount executable.
func (*Driver) Path ¶
func (p *Driver) Path(req *volume.PathRequest) (*volume.PathResponse, error)
Path Request the path to the volume with the given volume_name. Mountpoint is blank until the Mount method is called.
func (*Driver) Remove ¶
func (p *Driver) Remove(req *volume.RemoveRequest) error
Remove removes a specific volume.
func (*Driver) ServeUnix ¶
func (p *Driver) ServeUnix()
ServeUnix makes the handler to listen for requests in a unix socket. It also creates the socket filebased on the driver in the right directory for docker to read. If the "-h" argument is passed in on start up it will simply display the usage and terminate.
type DriverCallback ¶
type DriverCallback interface { // Validates the creation request to make sure the options are all valid. Validate(req *volume.CreateRequest) error // MountOptions specifies the options to be added to the mount process MountOptions(req *volume.CreateRequest) []string // PreMount is called before the mount occurs. This can be used to deal with scenarios where the credential data need to be unlocked. PreMount(req *volume.MountRequest) error // PostMount is deferred after PreMount occurs. PostMount(req *volume.MountRequest) volume.Driver }
DriverCallback inteface specifies methods that need to be implemented.