Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StreamCache = NewCache()
single instance of the pepr stream cache
Functions ¶
func Pepr ¶
func Pepr(k8sCtx string) func(w http.ResponseWriter, r *http.Request)
@Description Get Pepr data @Tags monitor @Accept html @Produce text/event-stream @Success 200 @Router /monitor/pepr/{stream} [get] @Param stream path string false "stream type to filter on, all streams by default" Enums(AnyStream, PolicyStream, OperatorStream, AllowStream, DenyStream, MutateStream, FailureStream)
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a simple cache for pepr stream data, it can be invalidated by a timer and max size
func (*Cache) Serve ¶
func (c *Cache) Serve(w http.ResponseWriter)
Serve attempts to serve a cached response if available.
type ClusterOverviewData ¶ added in v0.9.0
type ClusterOverviewData struct { TotalPods int `json:"totalPods"` TotalNodes int `json:"totalNodes"` CPUCapacity float64 `json:"cpuCapacity"` MemoryCapacity float64 `json:"memoryCapacity"` CurrentUsage resources.Usage `json:"currentUsage"` HistoricalUsage []resources.Usage `json:"historicalUsage"` PackagesData []map[string]interface{} `json:"packagesData"` PodsData []map[string]interface{} `json:"podsData"` }
Click to show internal directories.
Click to hide internal directories.