daemondb

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: 5 Imported by: 0

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) Delete added in v0.8.0

func (d *DaemonDB) Delete(key []byte) error

func (*DaemonDB) DeletePodVolume added in v0.8.0

func (d *DaemonDB) DeletePodVolume(podId, volName string) error

func (*DaemonDB) DeletePodVolumes

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

func (*DaemonDB) Get

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

func (*DaemonDB) GetPodVolume added in v0.8.0

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

func (*DaemonDB) GetString

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

func (*DaemonDB) LagecyDeleteAllP2V added in v0.8.0

func (d *DaemonDB) LagecyDeleteAllP2V() error

func (*DaemonDB) LagecyDeleteP2C added in v0.8.0

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

func (*DaemonDB) LagecyDeleteP2V added in v0.8.0

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

func (*DaemonDB) LagecyDeletePod added in v0.8.0

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

func (*DaemonDB) LagecyDeleteVM added in v0.8.0

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

func (*DaemonDB) LagecyDeleteVMByPod added in v0.8.0

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

Composition Process

func (*DaemonDB) LagecyGetAllPods added in v0.8.0

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

func (*DaemonDB) LagecyGetP2C added in v0.8.0

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

POD to Containers (string to string list)

func (*DaemonDB) LagecyGetP2V added in v0.8.0

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

POD to VM (string to string)

func (*DaemonDB) LagecyGetPod added in v0.8.0

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

Pods podId and args

func (*DaemonDB) LagecyGetVM added in v0.8.0

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

VM DATA (string to data)

func (*DaemonDB) LagecyListPod added in v0.8.0

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

func (*DaemonDB) LagecyUpdateP2C added in v0.8.0

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

func (*DaemonDB) LagecyUpdateP2V added in v0.8.0

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

func (*DaemonDB) LagecyUpdatePod added in v0.8.0

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

func (*DaemonDB) LagecyUpdateVM added in v0.8.0

func (d *DaemonDB) LagecyUpdateVM(id string, data []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) UpdatePodVolume

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

Pod Volumes

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