hooks

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: Apache-2.0 Imports: 12 Imported by: 7

Documentation

Index

Constants

View Source
const (
	// DefaultHooksDir Default directory containing hooks config files
	DefaultHooksDir = "/usr/share/containers/oci/hooks.d"
	// OverrideHooksDir Directory where admin can override the default configuration
	OverrideHooksDir = "/etc/containers/oci/hooks.d"
)

Variables

This section is empty.

Functions

func AddOCIHook

func AddOCIHook(g *generate.Generator, hook HookParams) error

AddOCIHook generates OCI specification using the included hook

func SetupHooks

func SetupHooks(hooksPath string) (map[string]HookParams, error)

SetupHooks takes a hookspath and reads all of the hooks in that directory. returning a map of the configured hooks

Types

type HookParams

type HookParams struct {
	Hook          string   `json:"hook"`
	Stage         []string `json:"stage"`
	Cmds          []string `json:"cmd"`
	Annotations   []string `json:"annotation"`
	HasBindMounts bool     `json:"hasbindmounts"`
	Arguments     []string `json:"arguments"`
}

HookParams is the structure returned from read the hooks configuration

Jump to

Keyboard shortcuts

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