hook

package
v0.0.0-...-acd7349 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2013 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

hook provides types that define the hooks known to the Uniter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Kind hooks.Kind

	// RelationId identifies the relation associated with the hook. It is
	// only set when Kind indicates a relation hook.
	RelationId int `yaml:"relation-id,omitempty"`

	// RemoteUnit is the name of the unit that triggered the hook. It is only
	// set when Kind inicates a relation hook other than relation-broken.
	RemoteUnit string `yaml:"remote-unit,omitempty"`

	// ChangeVersion identifies the most recent unit settings change
	// associated with RemoteUnit. It is only set when RemoteUnit is set.
	ChangeVersion int64 `yaml:"change-version,omitempty"`

	// Members may contain settings for units that are members of the relation,
	// keyed on unit name. If a unit is present in members, it is always a
	// member of the relation; if a unit is not present, no inferences about
	// its state can be drawn.
	Members map[string]map[string]interface{} `yaml:"members,omitempty"`
}

Info holds details required to execute a hook. Not all fields are relevant to all Kind values.

func (Info) Validate

func (hi Info) Validate() error

Validate returns an error if the info is not valid.

Jump to

Keyboard shortcuts

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