hooks

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseHook

type BaseHook struct {
	Type    HookType
	Enabled bool
}

type Hook

type Hook interface {
	Execute(
		ctx context.Context,
		ss *environment.ServiceSettings,
		tmpl template.Template,
		env environment.Environment,
		st task.Task,
	) (task.Task, error)
}

type HookArgsCommand

type HookArgsCommand struct {
	BaseHook
	Executable string
	Args       []string
}

func (*HookArgsCommand) Execute

type HookNative

type HookNative struct {
	BaseHook
}

func (*HookNative) Execute

type HookShellCommand

type HookShellCommand struct {
	BaseHook
	Command string
	Shell   string
}

func (*HookShellCommand) Execute

type HookSignal

type HookSignal struct {
	BaseHook
	Signal os.Signal
}

func (*HookSignal) Execute

type HookType

type HookType string
const (
	StartHookType   HookType = "start"
	StopHookType    HookType = "stop"
	ReloadHookType  HookType = "reload"
	RestartHookType HookType = "restart"
)

type Hooks

type Hooks map[HookType]Hook

type Maker

type Maker interface {
	MakeHooks(config map[string]types.SandboxHook) (Hooks, error)
	MakeHook(config types.SandboxHook, hookType HookType) (Hook, error)
}

func CreateMaker

func CreateMaker(fnd app.Foundation) Maker

Jump to

Keyboard shortcuts

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