plugin

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// queryTypes are the types of query the Nomad APM plugin can handle. Each
	// one has its own path to discovering the correct data and so its
	// important this is included and validated on every query request.
	QueryTypeTaskGroup = "taskgroup"
	QueryTypeNode      = "node"
)

Variables

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

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

Functions

func NewNomadPlugin

func NewNomadPlugin(log hclog.Logger) apm.APM

Types

type APMPlugin

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

func (*APMPlugin) PluginInfo

func (a *APMPlugin) PluginInfo() (*base.PluginInfo, error)

func (*APMPlugin) Query

Query satisfies the Query function on the apm.APM interface. The Nomad Metrics API doesn't provide historical data, so time range for the query is not used.

func (*APMPlugin) QueryMultiple added in v0.2.0

func (a *APMPlugin) QueryMultiple(q string, r sdk.TimeRange) ([]sdk.TimestampedMetrics, error)

func (*APMPlugin) SetConfig

func (a *APMPlugin) SetConfig(config map[string]string) error

Jump to

Keyboard shortcuts

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