plugin

package
v0.2.0-beta.6 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LatestVersion   = "latest"
	DefaultRegistry = "perses.dev"
)

Variables

Functions

This section is empty.

Types

type Kind

type Kind string
const (
	KindVariable        Kind = "Variable"
	KindDatasource      Kind = "Datasource"
	KindPanel           Kind = "Panel"
	KindTimeSeriesQuery Kind = "TimeSeriesQuery"
	KindTraceQuery      Kind = "TraceQuery"
	KindProfileQuery    Kind = "ProfileQuery"
	KindLogQuery        Kind = "LogQuery"
	KindQuery           Kind = "Query"
	KindAlertsQuery     Kind = "AlertsQuery"
	KindSilencesQuery   Kind = "SilencesQuery"
	KindExplore         Kind = "Explore"
	KindAnnotation      Kind = "Annotation"
)

func (Kind) IsQuery

func (k Kind) IsQuery() bool

type Metadata

type Metadata struct {
	// Version is optional. If not provided, it means the latest version available in the Perses instance.
	// Version needs to follow the semantic versioning format (e.g., "1.0.0" or "v1.0.0")
	Version string `json:"version,omitempty" yaml:"version,omitempty"`
	// Registry is optional. If not provided, it means the default registry is: "perses.dev".
	Registry string `json:"registry,omitempty" yaml:"registry,omitempty"`
}

type Plugin

type Plugin struct {
	// Kind is the type of the plugin (e.g., Panel, Variable, Datasource, etc.).
	Kind string `json:"kind" yaml:"kind"`
	// Metadata is an optional field that contains additional information such as version and registry of the plugin.
	Metadata *Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Spec any `json:"spec" yaml:"spec"`
}

func (Plugin) MarshalJSON

func (p Plugin) MarshalJSON() ([]byte, error)

func (Plugin) MarshalYAML

func (p Plugin) MarshalYAML() (interface{}, error)

func (*Plugin) UnmarshalJSON

func (p *Plugin) UnmarshalJSON(data []byte) error

func (*Plugin) UnmarshalYAML

func (p *Plugin) UnmarshalYAML(unmarshal func(any) error) error

Jump to

Keyboard shortcuts

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