handler

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2024 License: Apache-2.0 Imports: 25 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

func ExportFlows added in v0.1.2

func ExportFlows(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func GetClusters added in v0.1.12

func GetClusters(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func GetFlows

func GetFlows(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func GetFrontendConfig added in v0.1.12

func GetFrontendConfig(version, date, filename string) func(w http.ResponseWriter, r *http.Request)

func GetNames added in v0.1.2

func GetNames(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func GetNamespaces added in v0.1.2

func GetNamespaces(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func GetTopology added in v0.1.2

func GetTopology(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func GetZones added in v0.1.12

func GetZones(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func IngesterMaxChunkAge added in v0.1.12

func IngesterMaxChunkAge(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func LokiBuildInfos added in v0.1.3

func LokiBuildInfos(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func LokiConfig

func LokiConfig(cfg *loki.Config, param string) func(w http.ResponseWriter, r *http.Request)

func LokiMetrics added in v0.1.3

func LokiMetrics(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func LokiReady added in v0.1.3

func LokiReady(cfg *loki.Config) func(w http.ResponseWriter, r *http.Request)

func Status

func Status(w http.ResponseWriter, _ *http.Request)

Types

type Column added in v0.1.12

type Column struct {
	ID   string `yaml:"id" json:"id"`
	Name string `yaml:"name" json:"name"`

	Group      string   `yaml:"group,omitempty" json:"group,omitempty"`
	Field      string   `yaml:"field,omitempty" json:"field,omitempty"`
	Fields     []string `yaml:"fields,omitempty" json:"fields,omitempty"`
	Calculated string   `yaml:"calculated,omitempty" json:"calculated,omitempty"`
	Tooltip    string   `yaml:"tooltip,omitempty" json:"tooltip,omitempty"`
	DocURL     string   `yaml:"docURL,omitempty" json:"docURL,omitempty"`
	Filter     string   `yaml:"filter,omitempty" json:"filter,omitempty"`
	Default    bool     `yaml:"default,omitempty" json:"default,omitempty"`
	Width      int      `yaml:"width,omitempty" json:"width,omitempty"`
	Feature    string   `yaml:"feature" json:"feature"`
}

type Config added in v0.1.12

type Config struct {
	Loki     Loki     `yaml:"loki" json:"loki"`
	Frontend Frontend `yaml:"frontend" json:"frontend"`

	Server Server `yaml:"server,omitempty" json:"server,omitempty"`
}

func ReadConfigFile added in v0.1.12

func ReadConfigFile(version, date, filename string) (*Config, error)

type Deduper added in v0.1.12

type Deduper struct {
	Mark  bool `yaml:"mark" json:"mark"`
	Merge bool `yaml:"merge" json:"merge"`
}

type Filter added in v0.1.12

type Filter struct {
	ID        string `yaml:"id" json:"id"`
	Name      string `yaml:"name" json:"name"`
	Component string `yaml:"component" json:"component"`

	Category               string `yaml:"category,omitempty" json:"category,omitempty"`
	AutoCompleteAddsQuotes bool   `yaml:"autoCompleteAddsQuotes,omitempty" json:"autoCompleteAddsQuotes,omitempty"`
	Hint                   string `yaml:"hint,omitempty" json:"hint,omitempty"`
	Examples               string `yaml:"examples,omitempty" json:"examples,omitempty"`
	DocURL                 string `yaml:"docUrl,omitempty" json:"docUrl,omitempty"`
	Placeholder            string `yaml:"placeholder,omitempty" json:"placeholder,omitempty"`
}

type Frontend added in v0.1.12

type Frontend struct {
	BuildVersion    string        `yaml:"buildVersion" json:"buildVersion"`
	BuildDate       string        `yaml:"buildDate" json:"buildDate"`
	RecordTypes     []string      `yaml:"recordTypes" json:"recordTypes"`
	PortNaming      PortNaming    `yaml:"portNaming" json:"portNaming"`
	Columns         []Column      `yaml:"columns" json:"columns"`
	Filters         []Filter      `yaml:"filters" json:"filters"`
	QuickFilters    []QuickFilter `yaml:"quickFilters" json:"quickFilters"`
	AlertNamespaces []string      `yaml:"alertNamespaces" json:"alertNamespaces"`
	Sampling        int           `yaml:"sampling" json:"sampling"`
	Features        []string      `yaml:"features" json:"features"`
	Deduper         Deduper       `yaml:"deduper" json:"deduper"`
}

type Loki added in v0.1.12

type Loki struct {
	URL    string   `yaml:"url" json:"url"`
	Labels []string `yaml:"labels" json:"labels"`

	StatusURL          string `yaml:"statusUrl,omitempty" json:"statusUrl,omitempty"`
	Timeout            string `yaml:"timeout,omitempty" json:"timeout,omitempty"`
	TenantID           string `yaml:"tenantID,omitempty" json:"tenantID,omitempty"`
	TokenPath          string `yaml:"tokenPath,omitempty" json:"tokenPath,omitempty"`
	SkipTLS            bool   `yaml:"skipTls,omitempty" json:"skipTls,omitempty"`
	CAPath             string `yaml:"caPath,omitempty" json:"caPath,omitempty"`
	StatusSkipTLS      bool   `yaml:"statusSkipTls,omitempty" json:"statusSkipTls,omitempty"`
	StatusCAPath       string `yaml:"statusCaPath,omitempty" json:"statusCaPath,omitempty"`
	StatusUserCertPath string `yaml:"statusUserCertPath,omitempty" json:"statusUserCertPath,omitempty"`
	StatusUserKeyPath  string `yaml:"statusUserKeyPath,omitempty" json:"statusUserKeyPath,omitempty"`
	UseMocks           bool   `yaml:"useMocks,omitempty" json:"useMocks,omitempty"`
	ForwardUserToken   bool   `yaml:"forwardUserToken,omitempty" json:"forwardUserToken,omitempty"`
	AuthCheck          string `yaml:"authCheck,omitempty" json:"authCheck,omitempty"`
}

type LokiError added in v0.1.3

type LokiError struct {
	DisplayMessage string
	Message        string
}

type PortNaming added in v0.1.12

type PortNaming struct {
	Enable    bool              `yaml:"enable" json:"enable"`
	PortNames map[string]string `yaml:"portNames" json:"portNames"`
}

type QuickFilter added in v0.1.6

type QuickFilter struct {
	Name   string            `yaml:"name" json:"name"`
	Filter map[string]string `yaml:"filter" json:"filter"`

	Default bool `yaml:"default,omitempty" json:"default,omitempty"`
}

type Server added in v0.1.12

type Server struct {
	Port        int    `yaml:"port,omitempty" json:"port,omitempty"`
	MetricsPort int    `yaml:"metricsPort,omitempty" json:"metricsPort,omitempty"`
	CertPath    string `yaml:"certPath,omitempty" json:"certPath,omitempty"`
	KeyPath     string `yaml:"keyPath,omitempty" json:"keyPath,omitempty"`
	CORSOrigin  string `yaml:"corsOrigin,omitempty" json:"corsOrigin,omitempty"`
	CORSMethods string `yaml:"corsMethods,omitempty" json:"corsMethods,omitempty"`
	CORSHeaders string `yaml:"corsHeaders,omitempty" json:"corsHeaders,omitempty"`
	CORSMaxAge  string `yaml:"corsMaxAge,omitempty" json:"corsMaxAge,omitempty"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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