server

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2015 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KEY_VOLUME_UUID   = "volume-uuid"
	KEY_SNAPSHOT_UUID = "snapshot-uuid"

	VOLUME_CFG_PREFIX = "volume_"
	CFG_POSTFIX       = ".json"

	CONFIGFILE = "convoy.cfg"
	LOCKFILE   = "lock"
)

Variables

This section is empty.

Functions

func Start

func Start(sockFile string, c *cli.Context) error

Types

type Config

type Config struct {
	Root          string
	DriverList    []string
	DefaultDriver string
}

func (*Config) ConfigFile

func (c *Config) ConfigFile() (string, error)

type PluginInfo

type PluginInfo struct {
	Implements []string
}

type PluginRequest

type PluginRequest struct {
	Name string
}

type PluginResponse

type PluginResponse struct {
	Mountpoint string `json:",omitempty"`
	Err        string `json:",omitempty"`
}

type RequestHandler

type RequestHandler func(version string, w http.ResponseWriter, r *http.Request, objs map[string]string) error

type Server

type Server struct {
	Router              *mux.Router
	ConvoyDrivers       map[string]convoydriver.ConvoyDriver
	GlobalLock          *sync.RWMutex
	NameUUIDIndex       *util.Index
	SnapshotVolumeIndex *util.Index
	UUIDIndex           *truncindex.TruncIndex
	Config
}

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Snapshot

type Snapshot struct {
	UUID        string
	VolumeUUID  string
	Name        string
	CreatedTime string
}

type Volume

type Volume struct {
	UUID        string
	Name        string
	DriverName  string
	FileSystem  string
	CreatedTime string
	Snapshots   map[string]Snapshot
	// contains filtered or unexported fields
}

func (*Volume) ConfigFile

func (v *Volume) ConfigFile() (string, error)

Jump to

Keyboard shortcuts

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