Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicAuthCreds ¶
BasicAuthCreds can be used to restrict access to Server.
type CFClientConfig ¶
CFClientConfig contains the values required to configure a Cloud Foundry client.
type CFClients ¶
type CFClients struct {
// contains filtered or unexported fields
}
CFClients encapsulates Cloud Foundry clients across multiple environments.
func NewCFClients ¶
func NewCFClients( staging CFClientConfig, production CFClientConfig, ) *CFClients
NewCFClients makes a new CFClients.
func (*CFClients) NewProduction ¶
NewProduction makes a new Cloud Foundry client that connects to the production env.
type CFMetricStore ¶
CFMetricStore encapsulates Cloud Foundry metrics across multiple environments.
func NewCFMetricStore ¶
func NewCFMetricStore() *CFMetricStore
NewCFMetricStore makes a new initialized CFMetricStore.
type CachingPrometheus ¶
type CachingPrometheus struct {
// contains filtered or unexported fields
}
CachingPrometheus provides a database cache layer over the prometheus API.
func NewCachingPrometheus ¶
func NewCachingPrometheus( db *sql.DB, api prometheus.API, lifetime time.Duration, ) *CachingPrometheus
NewCachingPrometheus makes a new CachingPrometheus.
type Server ¶
type Server struct { Creds BasicAuthCreds NotFoundPath string NotFoundContent []byte UIDir string *CachingPrometheus PrometheusQueries map[string]string *CFMetricStore // contains filtered or unexported fields }
func (*Server) GetStat ¶
func (s *Server) GetStat(w http.ResponseWriter, r *http.Request)
GetStat is a handler that can return a stat with a provided `id` from the URL query.