debug

package
v0.0.0-...-a0d7459 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientScript

func ClientScript(c *HooksContext, hooks []string) string

ClientScript returns a bash script suitable for executing on the unit system to intercept hooks via tmux shell.

Types

type HooksContext

type HooksContext struct {
	Unit     string
	FlockDir string
}

func NewHooksContext

func NewHooksContext(unitName string) *HooksContext

func (*HooksContext) ClientExitFileLock

func (c *HooksContext) ClientExitFileLock() string

func (*HooksContext) ClientFileLock

func (c *HooksContext) ClientFileLock() string

func (*HooksContext) FindSession

func (c *HooksContext) FindSession() (*ServerSession, error)

FindSession attempts to find a debug hooks session for the unit specified in the context, and returns a new ServerSession structure for it.

type ServerSession

type ServerSession struct {
	*HooksContext
	// contains filtered or unexported fields
}

ServerSession represents a "juju debug-hooks" session.

func (*ServerSession) MatchHook

func (s *ServerSession) MatchHook(hookName string) bool

MatchHook returns true if the specified hook name matches the hook specified by the debug-hooks client.

func (*ServerSession) RunHook

func (s *ServerSession) RunHook(hookName, charmDir string, env []string) error

RunHook "runs" the hook with the specified name via debug-hooks.

Jump to

Keyboard shortcuts

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