metadata

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMetadataDumpSource added in v1.1.2

func GetMetadataDumpSource(store Store) diag.Source

GetMetadataDumpSource returns a Source that dumps Virtlet metadata.

func NewPodSandboxInfo added in v0.8.0

func NewPodSandboxInfo(config *types.PodSandboxConfig, csnData interface{}, state types.PodSandboxState, clock clockwork.Clock) (*types.PodSandboxInfo, error)

NewPodSandboxInfo is a factory function for PodSandboxInfo instances

Types

type ContainerMetadata added in v0.8.0

type ContainerMetadata interface {
	// GetID returns ID of the container managed by this object
	GetID() string

	// Retrieve loads from DB and returns container data bound to the object
	Retrieve() (*types.ContainerInfo, error)

	// Save allows to create/modify/delete container data bound to the object.
	// Supplied handler gets current ContainerInfo value (nil if doesn't exist) and returns new structure
	// value to be saved or nil to delete. If error value is returned from the handler, the transaction is
	// rolled back and returned error becomes the result of the function
	Save(func(*types.ContainerInfo) (*types.ContainerInfo, error)) error
}

ContainerMetadata contains methods of a single container (VM)

type ContainerStore added in v1.0.0

type ContainerStore interface {
	// Container returns interface instance which manages container with given ID
	Container(containerID string) ContainerMetadata

	// ListPodContainers returns a list of containers that belong to the pod with given ID value
	ListPodContainers(podID string) ([]ContainerMetadata, error)

	// ImagesInUse returns a set of images in use by containers in the store.
	// The keys of the returned map are image names and the values are always true.
	ImagesInUse() (map[string]bool, error)
}

ContainerStore contains methods to operate on containers (VMs)

type PodSandboxMetadata added in v0.8.0

type PodSandboxMetadata interface {
	// GetID returns ID of the pod sandbox managed by this object
	GetID() string

	// Retrieve loads from DB and returns pod sandbox data bound to the object
	Retrieve() (*types.PodSandboxInfo, error)

	// Save allows to create/modify/delete pod sandbox instance bound to the object.
	// Supplied handler gets current PodSandboxInfo value (nil if doesn't exist) and returns new structure
	// value to be saved or nil to delete. If error value is returned from the handler, the transaction is
	// rolled back and returned error becomes the result of the function
	Save(func(*types.PodSandboxInfo) (*types.PodSandboxInfo, error)) error
}

PodSandboxMetadata contains methods of a single Pod sandbox

type SandboxStore added in v1.0.0

type SandboxStore interface {
	// PodSandbox returns interface instance which manages pod sandbox with given ID
	PodSandbox(podID string) PodSandboxMetadata

	// ListPodSandboxes returns list of pod sandboxes that match given filter
	ListPodSandboxes(filter *types.PodSandboxFilter) ([]PodSandboxMetadata, error)
}

SandboxStore contains methods to operate on Pod sandboxes

type Store added in v1.0.0

type Store interface {
	SandboxStore
	ContainerStore
	io.Closer
}

Store provides single interface for metadata storage implementation

func NewFakeStore added in v1.0.0

func NewFakeStore() (Store, error)

NewFakeStore is a factory function for Store interface that returns fake store

func NewStore added in v1.0.0

func NewStore(path string) (Store, error)

NewStore is a factory function for Store interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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