juju: github.com/juju/juju/worker/common/charmrunner Index | Files

package charmrunner

import "github.com/juju/juju/worker/common/charmrunner"

Index

Package Files

errors.go logger.go

Variables

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

func IsBadActionError Uses

func IsBadActionError(err error) bool

func IsMissingHookError Uses

func IsMissingHookError(err error) bool

func NewBadActionError Uses

func NewBadActionError(actionName, problem string) error

func NewMissingHookError Uses

func NewMissingHookError(hookName string) error

type HookLogger Uses

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

HookLogger streams the output from a hook to message receivers.

func NewHookLogger Uses

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

NewHookLogger creates a new hook logger.

func (*HookLogger) Run Uses

func (l *HookLogger) Run()

Run starts the hook logger.

func (*HookLogger) Stop Uses

func (l *HookLogger) Stop()

Stop stops the hook logger.

type MessageReceiver Uses

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 Uses

type Stopper interface {
    Stop()
}

Stopper instances can be stopped.

Package charmrunner imports 7 packages (graph) and is imported by 16 packages. Updated 2019-09-30. Refresh now. Tools for package owners.