query

package
v0.0.0-...-215933a Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Preparer

type Preparer struct {
	Interpreter string            `hcl:"interpreter"`
	Query       string            `hcl:"query"`
	CheckFlags  []string          `hcl:"check_flags"`
	ExecFlags   []string          `hcl:"exec_flags"`
	Timeout     string            `hcl:"timeout" doc_type:"duration string"`
	Dir         string            `hcl:"dir"`
	Env         map[string]string `hcl:"env"`
}

Preparer handles querying

func (*Preparer) Prepare

func (p *Preparer) Prepare(render resource.Renderer) (resource.Task, error)

Prepare creates a new query type

type Query

type Query struct {
	*shell.Shell
}

Query represents an environmental query

func (*Query) Apply

func (q *Query) Apply() (resource.TaskStatus, error)

Apply is a nop for queries. Because HasChanges always returns false this should never be executed.

func (*Query) HasChanges

func (q *Query) HasChanges() bool

HasChanges returns true if changes are required as determined by the the most recent run of check.

func (*Query) Messages

func (q *Query) Messages() (messages []string)

Messages returns a summary of the first execution of check and/or apply. Subsequent runs are surpressed.

Jump to

Keyboard shortcuts

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