charmrunner

package
v0.0.0-...-3d086f3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrActionNotAvailable = errors.New("action no longer available")
View Source
var ErrNoProcess = errors.New("no process to kill")

Functions

func IsBadActionError

func IsBadActionError(err error) bool

func IsMissingHookError

func IsMissingHookError(err error) bool

func NewBadActionError

func NewBadActionError(actionName, problem string) error

func NewMissingHookError

func NewMissingHookError(hookName string) error

Types

type HookLogger

type HookLogger struct {
	// contains filtered or unexported fields
}

HookLogger streams the output from a hook to message receivers.

func NewHookLogger

func NewHookLogger(outReader io.ReadCloser, receivers ...MessageReceiver) *HookLogger

NewHookLogger creates a new hook logger.

func (*HookLogger) AddReceiver

func (l *HookLogger) AddReceiver(receiver MessageReceiver)

AddReceiver adds an additional receiver to get messages

func (*HookLogger) Run

func (l *HookLogger) Run()

Run starts the hook logger.

func (*HookLogger) Stop

func (l *HookLogger) Stop()

Stop stops the hook logger.

type MessageReceiver

type MessageReceiver interface {
	Messagef(isPrefix bool, message string, args ...interface{})
}

MessageReceiver instances are fed messages written to stdout/stderr when running hooks/actions.

type Stopper

type Stopper interface {
	Stop()
}

Stopper instances can be stopped.

Jump to

Keyboard shortcuts

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