pique

package module
v0.0.0-...-1037882 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAndLoad

func ParseAndLoad()

ParseAndLoad parses the config and loads it to the type

func Parsehcl

func Parsehcl()

Parsehcl parses hcl if you need more than simple parsing. Not required now.

Types

type BlockState

type BlockState int

BlockState should be output of the plugin

const (
	//SUCCEEDED is when a Block Succeeded
	SUCCEEDED BlockState = iota

	//FAILED is when Block fails, manual intervention is required.
	FAILED

	//PENDING is when a block is waiting for something to complete
	PENDING
)

func (BlockState) String

func (b BlockState) String() string

type Node

type Node struct {
	ID                string `hcl:"id,label"`
	Blockname         string `hcl:"blockname"`
	Pluginname        string `hcl:"plugin_name"`
	Functionname      string `hcl:"plugin_function_name"`
	Functionarguments string `hcl:"plugin_function_arguments"`
}

Node Struct is each node tin the Program

type Nodeblock

type Nodeblock struct {
	PluginName   string
	FunctionName string
	Arguments    string
}

Nodeblock is the minimum required to run the plugin

type Program

type Program struct {
	LogLevel       string `hcl:"log_level"`
	Name           string `hcl:"name"`
	CheckFrequency int32  `hcl:"check_frequency"`

	Nodes []Node `hcl:"node,block"`
}

Program struct is the Program that will get interpretted to protcol buffer and saved in a file

Jump to

Keyboard shortcuts

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