Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTableFormatter ¶
NewTableFormatter creates a writer for table format.
Types ¶
type Metadata ¶
type Metadata struct { Type string `json:"type"` Values any `json:"values"` // field=>[]Field, else []string }
Metadata represents metadata query result model.
type NodeStats ¶
type NodeStats struct { Node string `json:"node"` WaitCost int64 `json:"waitCost,omitempty"` // wait intermediate or leaf response duration WaitStart int64 `json:"waitStart,omitempty"` WaitEnd int64 `json:"waitEnd,omitempty"` NetPayload int64 `json:"netPayload,omitempty"` TotalCost int64 `json:"totalCost"` Start int64 `json:"start"` End int64 `json:"end"` Stages []*StageStats `json:"stages,omitempty"` Children []*NodeStats `json:"children,omitempty"` }
NodeStats represents query stats of node.
type OperatorStats ¶
type OperatorStats struct { Identifier string `json:"identifier"` Start int64 `json:"start"` End int64 `json:"end"` Cost int64 `json:"cost"` Stats interface{} `json:"stats,omitempty"` ErrMsg string `json:"errMsg,omitempty"` }
OperatorStats represents the stats of operator.
type ResultSet ¶
type ResultSet struct { Stats *NodeStats `json:"stats,omitempty"` Namespace string `json:"namespace,omitempty"` MetricName string `json:"metricName,omitempty"` GroupBy []string `json:"groupBy,omitempty"` Fields []string `json:"fields,omitempty"` Series []*Series `json:"series,omitempty"` StartTime int64 `json:"startTime,omitempty"` EndTime int64 `json:"endTime,omitempty"` Interval int64 `json:"interval,omitempty"` }
ResultSet represents the query result set
type Series ¶
type Series struct { Tags map[string]string `json:"tags,omitempty"` Fields map[string]map[int64]float64 `json:"fields,omitempty"` Exemplars map[string]map[int64][]*Exemplar `json:"exemplars,omitempty"` TagValues string `json:"-"` // return series in order by tag values }
Series represents one time series for metric.
type SeriesStats ¶
type SeriesStats struct {
NumOfSeries uint64 `json:"numOfSeries"`
}
SeriesStats represents the stats for series.
type StageStats ¶
type StageStats struct { Identifier string `json:"identifier"` Start int64 `json:"start"` End int64 `json:"end"` Cost int64 `json:"cost"` State string `json:"state"` ErrMsg string `json:"errMsg"` Async bool `json:"async"` Operators []*OperatorStats `json:"operators,omitempty"` Children []*StageStats `json:"children"` }
StageStats represents the stats of stage.
type Stats ¶
type Stats struct { TotalCost int64 `json:"totalCost"` Min int64 `json:"min"` Max int64 `json:"max"` Count int `json:"count"` Series int `json:"series,omitempty"` }
Stats represents the time stats
type TableFormatter ¶
type TableFormatter interface { // ToTable returns string value/row size for displaying result in terminal. ToTable() (rows int, tableStr string) }
TableFormatter represents table formatter for displaying result in terminal.
Click to show internal directories.
Click to hide internal directories.