decker

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// map to keep track of all the values returned from plugins
	ResultsMap       map[string]*map[string]cty.Value
	ResultsMapNested map[string]*map[string]*map[string]cty.Value
	Channel          chan Status
	Decoder          gocty.Decoder
	Encoder          gocty.Encoder
	Environment      *map[string]cty.Value
	Env              Env
	Blocks           []*hashicorpHCL.Block
	OutputsResults   plugins.OutputsResults
	ActiveBlock      Block
}

App is the main object for decker

func Init

func Init() *App

Init returns a new App object

func (*App) GetResults

func (a *App) GetResults()

GetResults gets the plugin results in XML and JSON formats

func (*App) RunPlugin

func (a *App) RunPlugin(b Block, p Plugin)

func (*App) RunPlugins

func (a *App) RunPlugins()

RunPlugins runs all the plugins

type Block

type Block struct {
	ResourceName     string
	PluginName       string
	PluginConfigPath string
	ForEach          bool
	HCLConfig        *hcl.PluginConfig
	PluginContent    *hashicorpHCL.BodyContent
	Plugins          []Plugin
}

func NewBlock

func NewBlock(block *hashicorpHCL.Block) Block

NewBlock initializes a block.

type Env

type Env struct {
	Outputs Outputs
}

type Outputs

type Outputs struct {
	XML  bool
	JSON bool
}

type Plugin

type Plugin struct {
	ResultsMap     map[string]cty.Value
	ResultsListMap map[string][]cty.Value
	InputsMap      map[string]cty.Value
	Enabled        bool
	Key            string
}

func NewPlugin

func NewPlugin(key string) Plugin

type Status

type Status struct {
	Queue   string
	Latency float64
}

Status is the resulting latency on a specific queue.

Jump to

Keyboard shortcuts

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