prometheus

package
v0.33.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module implements the module.Module interface for Prometheus.

func New

func New() *Module

New creates a new Prometheus module.

func (*Module) ApplyDefaults

func (m *Module) ApplyDefaults()

ApplyDefaults sets default values before validation.

func (*Module) DatasourceInfo

func (m *Module) DatasourceInfo() []types.DatasourceInfo

DatasourceInfo returns datasource metadata for datasources:// resources.

func (*Module) Examples

func (m *Module) Examples() map[string]types.ExampleCategory

Examples returns query examples for the Prometheus module.

func (*Module) Init

func (m *Module) Init(_ []byte) error

Init is a no-op: the module's datasources come from proxy discovery via InitFromDiscovery.

func (*Module) InitFromDiscovery

func (m *Module) InitFromDiscovery(datasources []types.DatasourceInfo) error

InitFromDiscovery initializes the module from discovered datasources. Safe to call repeatedly: subsequent calls replace the datasource list in place so the proxy client's periodic refresh propagates without a restart.

Always writes the filtered list, including when empty — see the comment on the clickhouse module's InitFromDiscovery for the rationale.

func (*Module) Name

func (m *Module) Name() string

func (*Module) PythonAPIDocs

func (m *Module) PythonAPIDocs() map[string]types.ModuleDoc

PythonAPIDocs returns the Prometheus module documentation.

func (*Module) SandboxEnv

func (m *Module) SandboxEnv() (map[string]string, error)

SandboxEnv returns environment variables for the sandbox.

func (*Module) Start

func (m *Module) Start(_ context.Context) error

Start performs async initialization.

func (*Module) Stop

func (m *Module) Stop(_ context.Context) error

Stop cleans up resources.

func (*Module) Validate

func (m *Module) Validate() error

Validate checks that the parsed config is valid.

Jump to

Keyboard shortcuts

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