state

package
v0.0.0-...-fbc5dbc Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2016 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUUID

func NewUUID() string

NewUUID provides a UUID based on RFC 4122 and DCE 1.1

Types

type Config

type Config struct {
	Mounts map[string]types.MountPoint // map[UUID]MountPoint
}

Config contains the metadata for mount information

type Context

type Context struct {
	Root string
}

Context is used when

func Initialize

func Initialize(root string) (*Context, error)

Initialize provides a Context from a state root directory

func (*Context) Mounts

func (ctx *Context) Mounts() (map[string]types.MountPoint, error)

Mounts is the list of all mounts from the Context's Config (all stored mounts)

func (*Context) NewMountPoint

func (ctx *Context) NewMountPoint() types.MountPoint

NewMountPoint prepares a MountPoint context with a new UUID. Once the MountPoint is populated, it must be saved with SaveMount

func (*Context) SaveMount

func (ctx *Context) SaveMount(m types.MountPoint) error

SaveMount stores a MountPoint to the Context's Config

Jump to

Keyboard shortcuts

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