factory

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FilterRegistry = make(RegistryFP)
	ScoreRegistry  = make(RegistrySP)
)

Functions

func GetFilterPlugin

func GetFilterPlugin(name string) (state.FilterPlugin, error)

func GetScorePlugin

func GetScorePlugin(name string) (state.ScorePlugin, error)

func RegisterFP

func RegisterFP(name string, factory state.FilterPlugin) error

Register adds a new plugin to the registry. If a plugin with the same name exists, it returns an error.

func RegisterSP

func RegisterSP(name string, factory state.ScorePlugin) error

Register adds a new plugin to the registry. If a plugin with the same name exists, it returns an error.

func UnregisterFP

func UnregisterFP(name string) error

Unregister removes an existing plugin from the registry. If no plugin with the provided name exists, it returns an error.

func UnregisterSP

func UnregisterSP(name string) error

Unregister removes an existing plugin from the registry. If no plugin with the provided name exists, it returns an error.

Types

type RegistryFP

type RegistryFP map[string]state.FilterPlugin

RegistryFP is a collection of all available filter plugins.

type RegistrySP

type RegistrySP map[string]state.ScorePlugin

RegistrySP is a collection of all available scoring plugins.

Jump to

Keyboard shortcuts

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