Documentation ¶
Index ¶
- Constants
- Variables
- func NameLabel() string
- func NamespaceLabel() string
- func NewEventService(cfg *Config) (ports.EventService, error)
- func NewEventServiceWithClient(cfg *Config, client *containerd.Client) ports.EventService
- func NewImageService(cfg *Config) (ports.ImageService, error)
- func NewImageServiceWithClient(cfg *Config, client Client) ports.ImageService
- func NewMicroVMRepo(cfg *Config) (ports.MicroVMRepository, error)
- func NewMicroVMRepoWithClient(cfg *Config, client *containerd.Client) ports.MicroVMRepository
- func TypeLabel() string
- func UIDLabel() string
- func VersionLabel() string
- type Client
- type Config
Constants ¶
const (
// MicroVMSpecType is the type name for a microvm spec.
MicroVMSpecType = "microvm"
)
Variables ¶
var ErrReadingContent = errors.New("failed reading from content store")
ErrReadingContent is used when there is an error reading from the content store.
Functions ¶
func NameLabel ¶
func NameLabel() string
NameLabel is the name of the containerd content store label used for the microvm name.
func NamespaceLabel ¶
func NamespaceLabel() string
NamespaceLabel is the name of the containerd content store label used for the microvm namespace.
func NewEventService ¶
func NewEventService(cfg *Config) (ports.EventService, error)
func NewEventServiceWithClient ¶
func NewEventServiceWithClient(cfg *Config, client *containerd.Client) ports.EventService
func NewImageService ¶
func NewImageService(cfg *Config) (ports.ImageService, error)
NewImageService will create a new image service based on containerd with the supplied config.
func NewImageServiceWithClient ¶
func NewImageServiceWithClient(cfg *Config, client Client) ports.ImageService
NewImageServiceWithClient will create a new image service based on containerd with the supplied containerd client.
func NewMicroVMRepo ¶
func NewMicroVMRepo(cfg *Config) (ports.MicroVMRepository, error)
NewMicroVMRepo will create a new containerd backed microvm repository with the supplied containerd configuration.
func NewMicroVMRepoWithClient ¶
func NewMicroVMRepoWithClient(cfg *Config, client *containerd.Client) ports.MicroVMRepository
NewMicroVMRepoWithClient will create a new containerd backed microvm repository with the supplied containerd client.
func TypeLabel ¶
func TypeLabel() string
TypeLabel is the name of the containerd content store label used to denote the type of content.
func UIDLabel ¶
func UIDLabel() string
UIDLabel is the name of the containerd content store label to hold UID of the content.
func VersionLabel ¶
func VersionLabel() string
VersionLabel is the name of the containerd content store label to hold version of the content.
Types ¶
type Client ¶
type Client interface { Close() error Conn() *grpc.ClientConn Containers(ctx context.Context, filters ...string) ([]containerd.Container, error) ContainerService() containers.Store ContentStore() content.Store DiffService() containerd.DiffService EventService() containerd.EventService Fetch(ctx context.Context, ref string, opts ...containerd.RemoteOpt) (images.Image, error) GetImage(ctx context.Context, ref string) (containerd.Image, error) GetLabel(ctx context.Context, label string) (string, error) GetSnapshotterSupportedPlatforms(ctx context.Context, snapshotterName string) (platforms.MatchComparer, error) HealthService() grpc_health_v1.HealthClient ImageService() images.Store IntrospectionService() introspection.Service IsServing(ctx context.Context) (bool, error) LeasesService() leases.Manager ListImages(ctx context.Context, filters ...string) ([]containerd.Image, error) LoadContainer(ctx context.Context, id string) (containerd.Container, error) NamespaceService() namespaces.Store NewContainer(ctx context.Context, id string, opts ...containerd.NewContainerOpts) (containerd.Container, error) Pull(ctx context.Context, ref string, opts ...containerd.RemoteOpt) (containerd.Image, error) Push(ctx context.Context, ref string, desc ocispec.Descriptor, opts ...containerd.RemoteOpt) error Reconnect() error Restore( ctx context.Context, id string, checkpoint containerd.Image, opts ...containerd.RestoreOpts, ) (containerd.Container, error) Runtime() string Server(ctx context.Context) (containerd.ServerInfo, error) SnapshotService(snapshotterName string) snapshots.Snapshotter Subscribe(ctx context.Context, filters ...string) (<-chan *events.Envelope, <-chan error) TaskService() tasks.TasksClient Version(ctx context.Context) (containerd.Version, error) VersionService() versionservice.VersionClient }
type Config ¶
type Config struct { // SnapshotterKernel is the name of the containerd snapshotter to use for kernel images. SnapshotterKernel string // SnapshotterVolume is the name of the containerd snapshotter to use for volume (inc initrd) images. SnapshotterVolume string // SocketPath is the path to the containerd socket. SocketPath string // Namespace is the default containerd namespace to use Namespace string }
Config holds the containerd configuration.