package hooks
import "github.com/Microsoft/hcsshim/internal/hooks"
Index ¶
- func AddOCIHook(spec *oci.Spec, hn HookName, hk oci.Hook) error
- func NewOCIHook(path string, args, env []string) oci.Hook
- type HookName
Functions ¶
func AddOCIHook ¶
AddOCIHook adds oci.Hook of the given hook name to spec.
func NewOCIHook ¶
NewOCIHook creates a new oci.Hook with given parameters.
Types ¶
type HookName ¶
type HookName string
Note: The below type definition as well as constants have been copied from https://github.com/opencontainers/runc/blob/master/libcontainer/configs/config.go. This is done to not introduce a direct dependency on runc, which would complicate integration with windows.
const ( // Prestart commands are executed after the container namespaces are created, // but before the user supplied command is executed from init. // Prestart commands are called in the Runtime namespace. // // Deprecated: use [CreateRuntime] instead. Prestart HookName = "prestart" // CreateRuntime commands MUST be called as part of the create operation after // the runtime environment has been created but before the pivot_root has been executed. // CreateRuntime is called immediately after the deprecated Prestart hook. // CreateRuntime commands are called in the Runtime Namespace. CreateRuntime HookName = "createRuntime" )
Source Files ¶
- Version
- v0.12.9 (latest)
- Published
- Oct 30, 2024
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 14 hours ago –
Tools for package owners.