rawblock

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBlock

func CreateBlock(block, fstype, mountLabel string, size uint64) error

func GetImage

func GetImage(blockBase, mntBase, id, fstype, mountLabel string, uid, gid int) error

func Init

func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error)

Init returns a new Raw Block driver. This sets the home directory for the driver and returns NaiveDiffDriver.

func PutImage

func PutImage(mntBase, id string) error

Types

type Driver

type Driver struct {
	sync.Mutex // Protects concurrent modification to active
	// contains filtered or unexported fields
}

Driver holds information about the driver, home directory of the driver. Driver implements graphdriver.ProtoDriver. It uses only basic vfs operations. In order to support layering, the block is created via reflink with the the parent layer Driver must be wrapped in NaiveDiffDriver to be used as a graphdriver.Driver

func (*Driver) Cleanup

func (d *Driver) Cleanup() error

Cleanup is used to implement graphdriver.ProtoDriver. There is no cleanup required for this driver.

func (*Driver) Create

func (d *Driver) Create(id, parent, mountLabel string) error

Create prepares the filesystem for the rawblock driver and copies the block from the parent.

func (*Driver) Exists

func (d *Driver) Exists(id string) bool

Exists checks to see if the directory exists for the given id.

func (*Driver) Get

func (d *Driver) Get(id, mountLabel string) (string, error)

Get returns the directory for the given id.

func (*Driver) GetMetadata

func (d *Driver) GetMetadata(id string) (map[string]string, error)

GetMetadata is used for implementing the graphdriver.ProtoDriver interface.

func (*Driver) Put

func (d *Driver) Put(id string) error

func (*Driver) Remove

func (d *Driver) Remove(id string) error

Remove deletes the content from the directory for a given id.

func (*Driver) Status

func (d *Driver) Status() [][2]string

Status is used for implementing the graphdriver.ProtoDriver interface.

func (*Driver) String

func (d *Driver) String() string

Jump to

Keyboard shortcuts

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