plugin

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PluginID = plugins.PluginID{
		Name:       pluginName,
		PluginType: sdk.PluginTypeStrategy,
	}

	PluginConfig = &plugins.InternalPluginConfig{
		Factory: func(l hclog.Logger) interface{} { return NewTargetValuePlugin(l) },
	}
)

Functions

func NewTargetValuePlugin

func NewTargetValuePlugin(log hclog.Logger) strategy.Strategy

NewTargetValuePlugin returns the TargetValue implementation of the strategy.Strategy interface.

Types

type StrategyPlugin

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

StrategyPlugin is the TargetValue implementation of the strategy.Strategy interface.

func (*StrategyPlugin) PluginInfo

func (s *StrategyPlugin) PluginInfo() (*base.PluginInfo, error)

PluginInfo satisfies the PluginInfo function on the base.Base interface.

func (*StrategyPlugin) Run

Run satisfies the Run function on the strategy.Strategy interface.

func (*StrategyPlugin) SetConfig

func (s *StrategyPlugin) SetConfig(config map[string]string) error

SetConfig satisfies the SetConfig function on the base.Base interface.

Jump to

Keyboard shortcuts

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