plugin

package
v0.0.0-...-22a6844 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

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

List is an object caching discovered plugins and their corresponding clients. Basically, it is a wrapper for go-plugin and provides an API to handle them collectively.

func Discover

func Discover() (*List, error)

Discover plugins and registers them. The lookup priority of plugins is as follow:

1. `TFDOCS_PLUGIN_DIR` environment variable (if it's set) 2. Current directory (./.tfdocs.d/plugins) 3. Home directory (~/.tfdocs.d/plugins)

Files under these directories that satisfy the "tfdocs-format-*" naming convention are treated as plugins.

func (*List) All

func (l *List) All() []*pluginsdk.Client

All returns all registered plugins.

func (*List) Clean

func (l *List) Clean()

Clean is a helper for ending plugin processes.

func (*List) Get

func (l *List) Get(name string) (*pluginsdk.Client, bool)

Get plugin by its name.

Jump to

Keyboard shortcuts

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