Documentation
¶
Index ¶
- Constants
- func GuestAttr(_ string, _ bool) (mode, uid, gid uint32, ok bool)
- func UnpackLayers(layers []v1.Layer, rootfsDir string, p *Progress) error
- type Client
- func (c *Client) GenerateBundle(bundleDir, imageDigest string, imgConfig *v1.ConfigFile) error
- func (c *Client) ImageExists(digest string) bool
- func (c *Client) LoadImageConfig(imageDigest string) (*v1.ConfigFile, error)
- func (c *Client) Pull(ctx context.Context, ref string) (*PullResult, error)
- func (c *Client) PullPlatform(ctx context.Context, ref, platformStr string) (*PullResult, error)
- type Progress
- type PullResult
Constants ¶
const ( UnikernelTypeAnnotation = "com.urunc.unikernel.unikernelType" HypervisorAnnotation = "com.urunc.unikernel.hypervisor" CmdlineAnnotation = "com.urunc.unikernel.cmdline" UnikernelBinaryAnnotation = "com.urunc.unikernel.binary" InitrdAnnotation = "com.urunc.unikernel.initrd" UnikernelVersionAnnotation = "com.urunc.unikernel.version" )
Annotation keys for urunc unikernel configuration (from pkg/unikontainers/config.go)
const DefaultPlatform = "linux/arm64"
DefaultPlatform is the pull platform when the caller does not ask for one: native arm64, the right answer for everything except the Rosetta path (an amd64 rootfs translated under an arm64 kernel).
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// Quiet suppresses pull progress output on stderr.
Quiet bool
// contains filtered or unexported fields
}
Client provides OCI image operations
func (*Client) GenerateBundle ¶
func (c *Client) GenerateBundle(bundleDir, imageDigest string, imgConfig *v1.ConfigFile) error
GenerateBundle creates an OCI runtime bundle (config.json + rootfs symlink) in the bundle directory
func (*Client) ImageExists ¶
ImageExists reports whether an image is cached AND usable. Metadata on its own does not count: see store.ImageComplete.
func (*Client) LoadImageConfig ¶
func (c *Client) LoadImageConfig(imageDigest string) (*v1.ConfigFile, error)
LoadImageConfig loads the OCI image config from a stored image
func (*Client) Pull ¶
Pull fetches an OCI image from a registry and stores it locally, selecting the default (native arm64) platform.
func (*Client) PullPlatform ¶
PullPlatform fetches an OCI image for an explicit platform. The store is digest-keyed, so different platform variants of the same tag coexist.