converge: github.com/asteris-llc/converge/resource/shell/query Index | Files

package query

import "github.com/asteris-llc/converge/resource/shell/query"

Index

Package Files

preparer.go query.go

type Preparer Uses

type Preparer struct {
    Interpreter string            `hcl:"interpreter"`
    Query       string            `hcl:"query" nonempty:"true"`
    CheckFlags  []string          `hcl:"check_flags"`
    ExecFlags   []string          `hcl:"exec_flags"`
    Timeout     *time.Duration    `hcl:"timeout"`
    Dir         string            `hcl:"dir"`
    Env         map[string]string `hcl:"env"`
}

Preparer handles querying

func (*Preparer) Prepare Uses

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

Prepare creates a new query type

type Query Uses

type Query struct {
    *shell.Shell `re-export-as:"task"`
}

Query represents an environmental query

func (*Query) Apply Uses

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

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

func (*Query) HasChanges Uses

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 Uses

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

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

Package query imports 7 packages (graph) and is imported by 1 packages. Updated 2016-12-25. Refresh now. Tools for package owners.