Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetadataDumpSource ¶
GetMetadataDumpSource returns a Source that dumps Virtlet metadata.
func NewPodSandboxInfo ¶
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 ¶
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 ¶
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)
// Check if a resource setting being updated or not
ResourceUpdateInProgress(containerID string) (bool, error)
// Update the vmconfig.ResourceUpdateInProgress flag
SetResourceUpdateInProgress(containerID string, state bool) error
}
ContainerStore contains methods to operate on containers (VMs)
type PodSandboxMetadata ¶
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 ¶
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 ¶
type Store interface {
SandboxStore
ContainerStore
io.Closer
// Reset the ResourceUpdateInProgress flag when runtime process restarts
ResetResourceUpdateInProgress() error
}
Store provides single interface for metadata storage implementation
func NewFakeStore ¶
NewFakeStore is a factory function for Store interface that returns fake store
Source Files
¶
Click to show internal directories.
Click to hide internal directories.