daemondb

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0 Imports: 5 Imported by: 7 modules, 11 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	VM_KEY            = "vmdata-%s"
	POD_KEY           = "pod-%s"
	POD_VM_KEY        = "vm-%s"
	POD_CONTAINER_KEY = "pod-container-%s"
	POD_VOLUME_KEY    = "vol-%s-%s"

	POD_PREFIX           = "pod-"
	POD_CONTAINER_PREFIX = "pod-container-"
	POD_VOLUME_PREFIX    = "vol-%s"
	POD_VM_PREFIX        = "vm-"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonDB

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

func NewDaemonDB

func NewDaemonDB(db_file string) (*DaemonDB, error)

func (*DaemonDB) Close

func (d *DaemonDB) Close() error

Low level util

func (*DaemonDB) DeleteAllP2V

func (d *DaemonDB) DeleteAllP2V() error

func (*DaemonDB) DeleteP2C

func (d *DaemonDB) DeleteP2C(id string) error

func (*DaemonDB) DeleteP2V

func (d *DaemonDB) DeleteP2V(id string) error

func (*DaemonDB) DeletePod

func (d *DaemonDB) DeletePod(id string) error

func (*DaemonDB) DeletePodVolumes

func (d *DaemonDB) DeletePodVolumes(podId string) error

func (*DaemonDB) DeleteVM

func (d *DaemonDB) DeleteVM(id string) error

func (*DaemonDB) DeleteVMByPod

func (d *DaemonDB) DeleteVMByPod(id string) error

Composition Process

func (*DaemonDB) Get

func (d *DaemonDB) Get(key []byte) ([]byte, error)

func (*DaemonDB) GetAllPods

func (d *DaemonDB) GetAllPods() chan *KVPair

func (*DaemonDB) GetP2C

func (d *DaemonDB) GetP2C(id string) ([]string, error)

POD to Containers (string to string list)

func (*DaemonDB) GetP2V

func (d *DaemonDB) GetP2V(id string) (string, error)

POD to VM (string to string)

func (*DaemonDB) GetPod

func (d *DaemonDB) GetPod(id string) ([]byte, error)

Pods podId and args

func (*DaemonDB) GetString

func (d *DaemonDB) GetString(key []byte) (string, error)

func (*DaemonDB) GetVM

func (d *DaemonDB) GetVM(id string) ([]byte, error)

VM DATA (string to data)

func (*DaemonDB) ListPod

func (d *DaemonDB) ListPod() ([][]byte, error)

func (*DaemonDB) ListPodVolumes

func (d *DaemonDB) ListPodVolumes(podId string) ([][]byte, error)

func (*DaemonDB) PrefixDelete

func (d *DaemonDB) PrefixDelete(prefix []byte) error

func (*DaemonDB) PrefixList

func (d *DaemonDB) PrefixList(prefix []byte, keyFilter KeyFilter) ([][]byte, error)

func (*DaemonDB) PrefixList2Chan

func (d *DaemonDB) PrefixList2Chan(prefix []byte, keyFilter KeyFilter) chan *KVPair

func (*DaemonDB) PrefixListKey

func (d *DaemonDB) PrefixListKey(prefix []byte, keyFilter KeyFilter) ([][]byte, error)

func (*DaemonDB) Update

func (d *DaemonDB) Update(key, data []byte) error

func (*DaemonDB) UpdateP2C

func (d *DaemonDB) UpdateP2C(id string, containers []string) error

func (*DaemonDB) UpdateP2V

func (d *DaemonDB) UpdateP2V(id, vm string) error

func (*DaemonDB) UpdatePod

func (d *DaemonDB) UpdatePod(id string, data []byte) error

func (*DaemonDB) UpdatePodVolume

func (d *DaemonDB) UpdatePodVolume(podId, volname string, data []byte) error

Pod Volumes

func (*DaemonDB) UpdateVM

func (d *DaemonDB) UpdateVM(id string, data []byte) error

type KVPair

type KVPair struct {
	K []byte
	V []byte
}

type KeyFilter

type KeyFilter func([]byte) bool

Jump to

Keyboard shortcuts

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