server

package
v0.0.0-...-a7b8d30 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const PROMETHEUS_TYPE = "prometheus"
View Source
const WAVEFRONT_TYPE = "wavefront"

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregatedResponse

type AggregatedResponse struct {
	Data       json.RawMessage     `json:"data"`
	Thresholds []ThresholdResponse `json:"thresholds,omitempty"`
}

AggregatedResponse represents the final output response structure returned by execute function

type Application

type Application struct {
	Name             string       `json:"name"`
	Default          bool         `json:"default"`
	DefaultDashboard *Dashboard   `json:"defaultDashboard"`
	Dashboards       []*Dashboard `json:"dashboards"`
}

type Dashboard

type Dashboard struct {
	Name         string   `json:"name"`
	GroupKind    string   `json:"groupKind"`
	RefreshRate  string   `json:"refreshRate"`
	Tabs         []string `json:"tabs"`
	Rows         []*Row   `json:"rows"`
	ProviderType string   `json:"providerType"`
	Intervals    []string `json:"intervals"`
}

type Graph

type Graph struct {
	Name            string      `json:"name"`
	Title           string      `json:"title"`
	Description     string      `json:"description"`
	GraphType       string      `json:"graphType"`
	MetricName      string      `json:"metricName"`
	ColorSchemes    []string    `json:"colorSchemes"`
	Thresholds      []Threshold `json:"thresholds"`
	QueryExpression string      `json:"queryExpression"`
	YAxisUnit       string      `json:"yAxisUnit"`
	ValueRounding   int         `json:"valueRounding"`
}

type MetricsConfigProvider

type MetricsConfigProvider struct {
	Applications []Application `json:"applications"`
	Provider     provider      `json:"provider"`
}

type MetricsProvider

type MetricsProvider interface {
	// contains filtered or unexported methods
}

type O11yConfig

type O11yConfig struct {
	Prometheus *MetricsConfigProvider `json:"prometheus"`
	Wavefront  *MetricsConfigProvider `json:"wavefront"`
}

type O11yServer

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

func NewO11yServer

func NewO11yServer(logger *zap.SugaredLogger, port int, enableTLS bool) O11yServer

func (*O11yServer) Run

func (ms *O11yServer) Run(ctx context.Context)

type PrometheusProvider

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

func NewPrometheusProvider

func NewPrometheusProvider(prometheusConfig *MetricsConfigProvider, logger *zap.SugaredLogger) *PrometheusProvider

type Row

type Row struct {
	Name   string   `json:"name"`
	Title  string   `json:"title"`
	Tab    string   `json:"tab"`
	Graphs []*Graph `json:"graphs"`
}

type Threshold

type Threshold struct {
	Key             string `json:"key"`
	Name            string `json:"name"`
	Color           string `json:"color"`
	Value           string `json:"value"`
	Unit            string `json:"unit"`
	QueryExpression string `json:"queryExpression"`
}

type ThresholdResponse

type ThresholdResponse struct {
	Data  json.RawMessage `json:"data"`
	Key   string          `json:"key"`
	Name  string          `json:"name"`
	Color string          `json:"color"`
	Value string          `json:"value"`
	Unit  string          `json:"unit"`
}

ThresholdResponse represents the response format for a threshold.

type WaveFrontProvider

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

func NewWavefrontProvider

func NewWavefrontProvider(waveFrontConfig *MetricsConfigProvider, token string, logger *zap.SugaredLogger) *WaveFrontProvider

Jump to

Keyboard shortcuts

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