Documentation ¶
Index ¶
- Constants
- Variables
- func GetTimeRange(gran ccloudmetrics.Granularity, maxDatapoints int) (time.Time, time.Time)
- func ProcessResult(result []ccloudmetrics.QueryData, maxDatapoints int) []float64
- type CCloudMetricWidget
- type CCloudMetricsBarChart
- type CCloudMetricsPlot
- type GraphSet
- type HotKey
- type HotKeyAction
- type LogrusList
- type TopGrid
Constants ¶
View Source
const ( MaxDatapointsBar = 20 MaxDatapointsPlot = 120 )
Variables ¶
View Source
var ( GranularityIncr = map[ccloudmetrics.Granularity]time.Duration{ ccloudmetrics.GranularityOneMin: 1 * time.Minute, ccloudmetrics.GranularityFiveMin: 5 * time.Minute, ccloudmetrics.GranularityFifteenMin: 15 * time.Minute, ccloudmetrics.GranularityThirtyMin: 30 * time.Minute, ccloudmetrics.GranularityOneHour: 1 * time.Hour, } )
Functions ¶
func GetTimeRange ¶
func GetTimeRange(gran ccloudmetrics.Granularity, maxDatapoints int) (time.Time, time.Time)
func ProcessResult ¶
func ProcessResult(result []ccloudmetrics.QueryData, maxDatapoints int) []float64
Types ¶
type CCloudMetricWidget ¶
type CCloudMetricWidget interface {
Update(*ccloudmetrics.MetricsClient, ccloudmetrics.Granularity, string, string, string)
}
type CCloudMetricsBarChart ¶
func NewCCloudMetricsBarChart ¶
func NewCCloudMetricsBarChart(metric ccloudmetrics.Metric) *CCloudMetricsBarChart
func (*CCloudMetricsBarChart) Update ¶
func (w *CCloudMetricsBarChart) Update(api *ccloudmetrics.MetricsClient, gran ccloudmetrics.Granularity, cluster, topic, requestType string)
type CCloudMetricsPlot ¶
func NewCCloudMetricsPlot ¶
func NewCCloudMetricsPlot(metrics ...ccloudmetrics.Metric) *CCloudMetricsPlot
func (*CCloudMetricsPlot) Update ¶
func (w *CCloudMetricsPlot) Update(api *ccloudmetrics.MetricsClient, gran ccloudmetrics.Granularity, cluster, topic, requestType string)
type HotKey ¶
type HotKey struct { Key string Name string Action func() HotKeyAction }
type HotKeyAction ¶
type HotKeyAction string
const ( HotKeyNothing HotKeyAction = "Nil" HotKeyExit HotKeyAction = "Exit" HotKeyUpdate HotKeyAction = "Update" )
type LogrusList ¶
func NewLogrusList ¶
func NewLogrusList(lvl ...log.Level) *LogrusList
func (*LogrusList) Levels ¶
func (lr *LogrusList) Levels() []log.Level
type TopGrid ¶
type TopGrid struct { ui.Grid HotKeys []HotKey Title *widgets.Paragraph Logs *LogrusList ActiveGraphSet GraphSet // contains filtered or unexported fields }
func NewTopGrid ¶
func (*TopGrid) HandleEvent ¶
func (g *TopGrid) HandleEvent(e ui.Event) HotKeyAction
func (*TopGrid) ReDraw ¶
func (g *TopGrid) ReDraw()
ReDraw Triggers a ReDrawing/ReRendering of the UI
func (*TopGrid) ToggleLogs ¶
ToggleLogs Hides and Shows the Logs widget at the bottom of the screen
Click to show internal directories.
Click to hide internal directories.