hook

package
v0.0.0-...-b27ac56 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecutionRecord

type ExecutionRecord struct {
	Id         int             `xml:"HOOK_ID"`
	ExecId     int             `xml:"EXECUTION_ID"`
	Timestamp  int             `xml:"TIMESTAMP"`
	Arguments  string          `xml:"ARGUMENTS"`
	HookLog    ExecutionResult `xml:"EXECUTION_RESULT"`
	RemoteHost string          `xml:"REMOTE_HOST"`
	Retry      string          `xml:"RETRY"`
}

type ExecutionResult

type ExecutionResult struct {
	Command string `xml:"COMMAND"`
	Stdout  string `xml:"STDOUT"`
	Stderr  string `xml:"STDERR"`
	Code    string `xml:"CODE"`
}

type Hook

type Hook struct {
	XMLName  xml.Name `xml:"HOOK"`
	ID       int      `xml:"ID"`
	Name     string   `xml:"NAME"`
	Type     string   `xml:"TYPE"`
	Template Template `xml:"TEMPLATE"`
	Log      HookLog  `xml:"HOOKLOG"`
}

Hook represents an OpenNebula Hook

type HookLog

type HookLog struct {
	ExecutionRecords []ExecutionRecord `xml:"HOOK_EXECUTION_RECORD"`
}

type Pool

type Pool struct {
	XMLName xml.Name `xml:"HOOK_POOL"`
	Hooks   []Hook   `xml:"HOOK"`
}

Pool represents an OpenNebula Hook pool

type Template

type Template struct {
	dyn.Template
}

Template is a hook template

func NewTemplate

func NewTemplate() *Template

NewTemplate returns a hook Template structure

func (*Template) Add

func (n *Template) Add(key keys.Template, value string)

Add adds an hook template key, value pair

func (*Template) Get

func (n *Template) Get(key keys.Template) (string, error)

Get returns the string value for an hook template keys

func (*Template) GetI

func (n *Template) GetI(key keys.Template) (int, error)

GetI returns the integer value for a hook template key

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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