srv

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RPS         = `sum(irate(request_total%s[%s])) by (app)`
	SUCCESSRATE = `sum(irate(response_total%s[%s])) by (app) / sum(irate(response_total%s[%s])) by (app)`

	DEBUG2 = `` /* 153-byte string literal not displayed */
	DEBUG3 = `histogram_quantile(0.5, sum(irate(response_latency_ms_bucket{direction="inbound"}[30s])) by (le,app))`

	IncomingIdentityQuery = `count(response_total{deployment!="", direction="inbound"}) by (deployment, app, version, client_id, namespace, no_tls_reason)`
	OutgoingIdentityQuery = `` /* 142-byte string literal not displayed */
)

Variables

This section is empty.

Functions

func NewServer

func NewServer(
	addr string,
	grafanaAddr string,
	controllerNamespace string,
	clusterDomain string,
	reload bool,
	uuid string,
	apiClient api.Client,
	k8sAPI *k8s.KubernetesAPI,
) *http.Server

NewServer returns an initialized `http.Server`, configured to listen on an address, render templates, and serve static assets, for a given Linkerd control plane.

Types

type AppVersionNamespace

type AppVersionNamespace string

type Edge

type Edge struct {
	FromNamespace string             `json:"fromNamespace"`
	FromApp       string             `json:"fromApp"`
	FromVersion   string             `json:"fromVersion"`
	ToNamespace   string             `json:"toNamespace"`
	ToApp         string             `json:"toApp"`
	ToVersion     string             `json:"toVersion"`
	Stats         map[string]float64 `json:"stats,omitempty"`
}

type EdgeResp

type EdgeResp struct {
	Nodes     []Node `json:"nodes"`
	Edges     []Edge `json:"edges,omitempty"`
	Integrity string `json:"integrity"`
}

type Node

type Node struct {
	App       string             `json:"app"`
	Version   string             `json:"version"`
	Namespace string             `json:"namespace"`
	Stats     map[string]float64 `json:"stats,omitempty"`
}

type Server

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

Server encapsulates the code for talking with prometheus

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request)

this is called by the HTTP server to actually respond to a request

Jump to

Keyboard shortcuts

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