actions

package
Version: v0.0.0-...-9a03d5f Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 3 Imported by: 12

Documentation

Index

Constants

View Source
const JujuExecActionName = "juju-exec"

JujuExecActionName defines the action name used by juju-exec.

Variables

View Source
var PredefinedActionsSpec = map[string]charm.ActionSpec{
	JujuExecActionName: {
		Description: "predefined juju-exec action",
		Parallel:    true,
		Params: map[string]interface{}{
			"type":        "object",
			"title":       JujuExecActionName,
			"description": "predefined juju-exec action params",
			"required":    []interface{}{"command", "timeout"},
			"properties": map[string]interface{}{
				"command": map[string]interface{}{
					"type":        "string",
					"description": "command to be ran under juju-exec",
				},
				"timeout": map[string]interface{}{
					"type":        "number",
					"description": "timeout for command execution",
				},
				"workload-context": map[string]interface{}{
					"type":        "boolean",
					"description": "run the command in k8s workload context",
				},
			},
		},
	},
}

PredefinedActionsSpec defines a spec for each predefined action.

Functions

func HasJujuExecAction

func HasJujuExecAction(commands string) bool

HasJujuExecAction returns true if the "juju-exec" binary name appears anywhere in the specified commands.

func IsJujuExecAction

func IsJujuExecAction(name string) bool

IsJujuExecAction returns true if name is the "juju-exec" action.

Types

type ActionMessage

type ActionMessage struct {
	Message   string    `json:"message"`
	Timestamp time.Time `json:"timestamp"`
}

ActionMessage is a timestamped message logged by a running action.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL