plugin

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PluginRoot = "~/.tflint.d/plugins"

PluginRoot is the root directory of the plugins This variable is exposed for testing.

Functions

This section is empty.

Types

type Plugin

type Plugin struct {
	RuleSets []*tfplugin.Client
	// contains filtered or unexported fields
}

Plugin is an object handling plugins Basically, it is a wrapper for go-plugin and provides an API to handle them collectively.

func Discovery added in v0.14.0

func Discovery(config *tflint.Config) (*Plugin, error)

Discovery searches plugins according the passed configuration The search priority of plugins is as follows:

  1. Current directory (./.tflint.d/plugins)
  2. Home directory (~/.tflint.d/plugins)

Files under these directories that satisfy the "tflint-ruleset-*" naming rules enabled in the configuration are treated as plugins.

If the `TFLINT_PLUGIN_DIR` environment variable is set, ignore the above and refer to that directory.

func (*Plugin) Clean added in v0.14.0

func (p *Plugin) Clean()

Clean is a helper for ending plugin processes

type Server added in v0.14.0

type Server struct {
	// contains filtered or unexported fields
}

Server is a RPC server for responding to requests from plugins

func NewServer added in v0.14.0

func NewServer(runner *tflint.Runner, sources map[string][]byte) *Server

NewServer initializes a RPC server for plugins

func (*Server) Attributes added in v0.14.0

Attributes returns corresponding hcl.Attributes

func (*Server) Backend added in v0.18.0

func (s *Server) Backend(req *tfplugin.BackendRequest, resp *tfplugin.BackendResponse) error

Backend returns corresponding configs.Backend as tfplugin.Backend

func (*Server) Blocks added in v0.17.0

func (s *Server) Blocks(req *tfplugin.BlocksRequest, resp *tfplugin.BlocksResponse) error

Blocks returns corresponding hcl.Blocks

func (*Server) EmitIssue added in v0.14.0

func (s *Server) EmitIssue(req *tfplugin.EmitIssueRequest, resp *interface{}) error

EmitIssue reflects a issue to the Runner

func (*Server) EvalExpr added in v0.14.0

func (s *Server) EvalExpr(req *tfplugin.EvalExprRequest, resp *tfplugin.EvalExprResponse) error

EvalExpr returns a value of the evaluated expression

func (*Server) Resources added in v0.17.0

func (s *Server) Resources(req *tfplugin.ResourcesRequest, resp *tfplugin.ResourcesResponse) error

Resources returns corresponding configs.Resource as tfplugin.Resource

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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