juju: github.com/juju/juju/worker/uniter/runner/debug Index | Files

package debug

import "github.com/juju/juju/worker/uniter/runner/debug"

Index

Package Files

client.go common.go server.go

func ClientScript Uses

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

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

type HooksContext Uses

type HooksContext struct {
    Unit     string
    FlockDir string
}

func NewHooksContext Uses

func NewHooksContext(unitName string) *HooksContext

func (*HooksContext) ClientExitFileLock Uses

func (c *HooksContext) ClientExitFileLock() string

func (*HooksContext) ClientFileLock Uses

func (c *HooksContext) ClientFileLock() string

func (*HooksContext) FindSession Uses

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 Uses

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

ServerSession represents a "juju debug-hooks" session.

func (*ServerSession) MatchHook Uses

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 Uses

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

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

Package debug imports 14 packages (graph) and is imported by 68 packages. Updated 2019-08-31. Refresh now. Tools for package owners.