handler

package
v1.8.0-community Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeQuery added in v0.1.2

func EncodeQuery(url string) string

loki query will fail if spaces or quotes are not encoded * we can't use url.QueryEscape or url.Values here since Loki doesn't manage encoded parenthesis

Types

type DatasourceStatus

type DatasourceStatus struct {
	IsEnabled       bool   `yaml:"isEnabled" json:"isEnabled"`
	NamespacesCount int    `yaml:"namespacesCount" json:"namespacesCount"`
	IsReady         bool   `yaml:"isReady" json:"isReady"`
	Error           string `yaml:"error" json:"error"`
	ErrorCode       int    `yaml:"errorCode" json:"errorCode"`
}

type Handlers

type Handlers struct {
	Cfg           *config.Config
	PromInventory *prometheus.Inventory
}

func (*Handlers) ExportFlows

func (h *Handlers) ExportFlows(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetClusters

func (h *Handlers) GetClusters(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetFlows

func (h *Handlers) GetFlows(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetFrontendConfig

func (h *Handlers) GetFrontendConfig() func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetNames

func (h *Handlers) GetNames(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetNamespaces

func (h *Handlers) GetNamespaces(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetTopology

func (h *Handlers) GetTopology(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetUDNs

func (h *Handlers) GetUDNs(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetZones

func (h *Handlers) GetZones(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

func (*Handlers) LokiBuildInfos

func (h *Handlers) LokiBuildInfos() func(w http.ResponseWriter, r *http.Request)

func (*Handlers) LokiLimits

func (h *Handlers) LokiLimits() func(w http.ResponseWriter, r *http.Request)

func (*Handlers) LokiMetrics

func (h *Handlers) LokiMetrics() func(w http.ResponseWriter, r *http.Request)

func (*Handlers) LokiReady

func (h *Handlers) LokiReady() func(w http.ResponseWriter, r *http.Request)

func (*Handlers) Status

func (h *Handlers) Status(ctx context.Context) func(w http.ResponseWriter, r *http.Request)

type LokiError added in v0.1.3

type LokiError struct {
	DisplayMessage string
	Message        string
}

type Status

type Status struct {
	Loki       DatasourceStatus `yaml:"loki" json:"loki"`
	Prometheus DatasourceStatus `yaml:"prometheus" json:"prometheus"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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