plugins

package
v4.1.15 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2025 License: GPL-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAvailablePlugins

func GetAvailablePlugins() map[string][]string

GetAvailable Plugins returns a list of all registered plugins by plugin type

func GetAvailableQuerierPlugins

func GetAvailableQuerierPlugins() []string

GetAvailablePlugins returns a list of all registered querier plugins

func InitQuerier

func InitQuerier(ctx context.Context, name, cfgPath string) (distributed.Querier, error)

InitQuerier will initialize a querier plugin with the given name and configuration path. If the plugin never registered itself, an error will be returned

func RegisterQuerier

func RegisterQuerier(name string, initFn QuerierInitializer)

RegisterQuerier registers a querier initializer function with a given name. This function is meant to be used by querier plugins to register themselves. RegisterQuerier will panic if a querier with the same name has already been registered

Types

type Initializer

type Initializer struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Initializer is a singleton that holds all registered plugins

func GetInitializer

func GetInitializer() *Initializer

GetInitializer returns the singleton Initializer instance. It is safe to call this function concurrently. Repeated calls will return the same instance

func (*Initializer) LogValue

func (i *Initializer) LogValue() slog.Value

type QuerierInitializer

type QuerierInitializer func(ctx context.Context, cfgPath string) (distributed.Querier, error)

QuerierInitializer is a function that initializes a querier instance. The cfgPath parameter mandates that the querier plugin must be able to read in its configuration from a file

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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