Back to

package charmrunner

v0.0.0 (4dcf1d7)
Latest Go to latest
Published: 1 day ago | License: AGPL-3.0 | Module:



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

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

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) 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 {

Stopper instances can be stopped.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
f or F : Jump to identifier