plugins

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterPlugin

func RegisterPlugin(pluginName string, p Plugin)

Types

type Plugin

type Plugin interface {
	// ParseConfig is used to parse config
	ParseConfig(bs []byte) (any, error)
	// Scrape is used to scrape metrics, cfg need to be cost specific cfg
	Scrape(ctx context.Context, target string, cfg any, ss *types.Samples) error
}

func GetPlugin

func GetPlugin(pluginName string) (Plugin, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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