metadata

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2017 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerInfo

type ContainerInfo struct {
	Name                string
	CreatedAt           int64
	StartedAt           int64
	SandboxID           string
	Image               string
	RootImageVolumeName string
	Labels              map[string]string
	Annotations         map[string]string
	Attempt             uint32
	State               kubeapi.ContainerState
}

ContainerInfo contains metadata information about container instance

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() (*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(*ContainerInfo) (*ContainerInfo, error)) error
}

ContainerMetadata contains methods of a single container (VM)

type ContainerMetadataStore

type ContainerMetadataStore 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)
}

ContainerMetadataStore contains methods to operate on containers (VMs)

type ImageMetadataStore

type ImageMetadataStore interface {
	// SetImageName associates image name with the volume
	SetImageName(volumeName, imageName string) error

	// GetImageName returns image name associated with the volume
	GetImageName(volumeName string) (string, error)

	// RemoveImage removes volume name association from the volume name
	RemoveImage(volumeName string) error
}

ImageMetadataStore contains methods to operate on VM images

type MetadataStore

MetadataStore provides single interface for metadata storage implementation

func NewFakeMetadataStore added in v0.8.0

func NewFakeMetadataStore() (MetadataStore, error)

NewFakeMetadataStore is a factory function for MetadataStore interface that returns fake store

func NewMetadataStore added in v0.8.0

func NewMetadataStore(path string) (MetadataStore, error)

NewMetadataStore is a factory function for MetadataStore interface

type PodSandboxInfo added in v0.8.0

type PodSandboxInfo struct {
	Metadata        *kubeapi.PodSandboxMetadata
	CreatedAt       int64
	Labels          map[string]string
	Hostname        string
	LogDirectory    string
	Annotations     map[string]string
	State           kubeapi.PodSandboxState
	CgroupParent    string
	NamespaceOption *kubeapi.NamespaceOption
	CNIConfig       string
	// contains filtered or unexported fields
}

PodSandboxInfo contains metadata information about pod sandbox instance

func NewPodSandboxInfo added in v0.8.0

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

NewPodSandboxInfo is a factory function for PodSandboxInfo instances

func (*PodSandboxInfo) AsPodSandbox added in v0.8.0

func (psi *PodSandboxInfo) AsPodSandbox() *kubeapi.PodSandbox

AsPodSandbox converts PodSandboxInfo to an instance of PodSandbox

func (*PodSandboxInfo) AsPodSandboxStatus added in v0.8.0

func (psi *PodSandboxInfo) AsPodSandboxStatus() *kubeapi.PodSandboxStatus

AsPodSandboxStatus converts PodSandboxInfo to an instance of PodSandboxStatus

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() (*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(*PodSandboxInfo) (*PodSandboxInfo, error)) error
}

PodSandboxMetadata contains methods of a single Pod sandbox

type SandboxMetadataStore

type SandboxMetadataStore 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 *kubeapi.PodSandboxFilter) ([]PodSandboxMetadata, error)
}

SandboxMetadataStore contains methods to operate on Pod sandboxes

Jump to

Keyboard shortcuts

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