execution

package
v0.0.0-...-47a5711 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	State() string
	Commands() <-chan command.Message
	PubEvent(etype event.Type, data ...interface{})
	Close()

	// Lifecycle hooks (extension points)
	HookSensorPostStart()
	HookSensorPreShutdown()
	HookMonitorPreStart()
	HookTargetAppRunning()
	HookMonitorPostShutdown()
	HookMonitorFailed()
}

func NewControlled

func NewControlled(
	ctx context.Context,
	lifecycleHookCommand string,
) (Interface, error)

func NewStandalone

func NewStandalone(
	ctx context.Context,
	commandFileName string,
	eventFileName string,
	lifecycleHookCommand string,
) (Interface, error)

type LifecycleEvent

type LifecycleEvent struct {
	Timestamp int64  `json:"ts"`
	SeqNumber uint64 `json:"sn"`
}

todo: add 'kind' to the lifecycle event and pass the whole event to the lifecycle hook command

Jump to

Keyboard shortcuts

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