oci

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = fmt.Sprintf("%v%v", specs.Version, reducedOciVersionTag)

Functions

func HooksFromSpec

func HooksFromSpec(spec *specs.Hooks, hook LifecycleHook) (hooks []specs.Hook)

HooksFromSpec retrieves the hooks corresponding to the specified lifecycle stage from the specification.

func InvokeHooks

func InvokeHooks(hooks *specs.Hooks, hook LifecycleHook) (err error)

InvokeHooks runs the hooks corresponding to the specified lifecycle stage.

func MountOptions

func MountOptions(mount *specs.Mount) (flags int, opts string)

func ParseMountOptions

func ParseMountOptions(options []string) (flags int, opts string)

func Rootfs

func Rootfs(spec *specs.Root) string

func RunHook

func RunHook(ctx context.Context, hook specs.Hook) error

RunHook executes a single OCI hook with the specified context.

func RunHooks

func RunHooks(ctx context.Context, hooks []specs.Hook) (err error)

RunHooks executes a sequence of hooks in the order they are provided.

Types

type LifecycleHook

type LifecycleHook uint8
const (
	HookCreateRuntime LifecycleHook = iota
	HookCreateContainer
	HookStartContainer
	HookPostStart
	HookPostStop
	// HookPreStart is deprecated
	HookPreStart
)

Jump to

Keyboard shortcuts

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