dkvolume

package module
v0.0.0-...-e444ca7 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2015 License: MIT Imports: 8 Imported by: 0

README

THIS REPO IS NOT MAINTAINED ANYMORE.

Check this drop in replacement out:

https://github.com/docker/go-plugins-helpers

Documentation

Index

Constants

View Source
const (
	// DefaultDockerRootDirectory is the default directory where volumes will be created.
	DefaultDockerRootDirectory = "/var/lib/docker-volumes"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Create(Request) Response
	Remove(Request) Response
	Path(Request) Response
	Mount(Request) Response
	Unmount(Request) Response
}

Driver represent the interface a driver must fulfill.

type Handler

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

Handler forwards requests and responses between the docker daemon and the plugin.

func NewHandler

func NewHandler(driver Driver) *Handler

NewHandler initializes the request handler with a driver implementation.

func (*Handler) ServeTCP

func (h *Handler) ServeTCP(pluginName, addr string) error

ServeTCP makes the handler to listen for request in a given TCP address. It also writes the spec file on the right directory for docker to read.

func (*Handler) ServeUnix

func (h *Handler) ServeUnix(systemGroup, addr string) error

ServeUnix makes the handler to listen for requests in a unix socket. It also creates the socket file on the right directory for docker to read.

type Request

type Request struct {
	Name    string
	Options map[string]string `json:"Opts,omitempty"`
}

Request is the structure that docker's requests are deserialized to.

type Response

type Response struct {
	Mountpoint string
	Err        string
}

Response is the strucutre that the plugin's responses are serialized to.

Jump to

Keyboard shortcuts

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