plugin

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MPL-2.0 Imports: 8 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 NewThresholdPlugin(l) },
	}
)

Functions

func NewThresholdPlugin

func NewThresholdPlugin(log hclog.Logger) strategy.Strategy

NewThresholdPlugin returns the Threshold implementation of the strategy.Strategy interface.

Types

type StrategyPlugin

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

StrategyPlugin is the Threshold 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(_ 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