docker

package
v0.0.0-...-da19d2a Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Root for mount
	Root       string
	MountPoint string
	// Address and config for ssh
	SSHServer string
	SSHConfig *ssh.ClientConfig
}

Config configures the docker volume plugin

type Driver

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

Driver implements the interface for a Docker volume plugin

func New

func New(config Config) (*Driver, error)

New instantiates a new driver and returns it

func (*Driver) Capabilities

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

Capabilities Driver

func (*Driver) Create

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

Create handles volume creation calls

func (*Driver) Get

Get retrieves a volume

func (*Driver) List

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

List mounted volumes

func (*Driver) Mount

Mount handles creating and mounting servers

func (*Driver) Path

Path handles calls for mountpoints

func (*Driver) Remove

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

Remove handles volume removal calls

func (*Driver) Stop

func (d *Driver) Stop() []error

Stop stops all the servers

func (*Driver) Unmount

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

Unmount handles unmounting (but not removing) servers

type Server

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

Server wraps SSHFS and tracks connection counts

func NewServer

func NewServer(config *ssh.ClientConfig, mountpoint, server, root string) (*Server, error)

NewServer returns a new server with initial state

func (*Server) Mount

func (s *Server) Mount() error

Mount mounts the wrapped FS on a given mountpoint. It also starts watching for errors, which it will log.

func (*Server) Unmount

func (s *Server) Unmount() error

Unmount stops the wrapped FS. It returns the last error that it sees, but will log any others it receives.

Jump to

Keyboard shortcuts

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