docker

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

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

	// Token and config for Vault
	Token      string
	AuthMethod string
	Vault      *api.Config
}

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

New instantiates a new driver and returns it

func (Driver) Capabilities

func (d Driver) Capabilities(r volume.Request) volume.Response

Capabilities tells docker we provide local volume support only.

func (Driver) Create

func (d Driver) Create(r volume.Request) volume.Response

Create handles volume creation calls

func (Driver) Get

func (d Driver) Get(r volume.Request) volume.Response

Get retrieves a volume

func (Driver) List

func (d Driver) List(r volume.Request) volume.Response

List mounted volumes

func (Driver) Mount

Mount handles creating and mounting servers

func (Driver) Path

func (d Driver) Path(r volume.Request) volume.Response

Path handles calls for mountpoints

func (Driver) Remove

func (d Driver) Remove(r volume.Request) volume.Response

Remove handles volume removal calls

func (Driver) Stop

func (d Driver) Stop() []error

Stop stops all the servers

func (Driver) Unmount

Unmount handles unmounting (but not removing) servers

type Server

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

Server wraps VaultFS and tracks connection counts

func NewServer

func NewServer(config *api.Config, mountpoint, token, authMethod, 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