Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregation ¶
type Aggregation struct {
Query string `json:"query"`
Chart string `json:"chart"`
Times AggregationTimes `json:"times"`
Options AggregationOptions `json:"options"`
}
Aggregation is the structure of the data, which is required to run an aggregation.
type AggregationOptions ¶
type AggregationOptions struct {
SliceBy string `json:"sliceBy"`
SizeByOperation string `json:"sizeByOperation"`
SizeByField string `json:"sizeByField"`
HorizontalAxisOperation string `json:"horizontalAxisOperation"`
HorizontalAxisField string `json:"horizontalAxisField"`
HorizontalAxisOrder string `json:"horizontalAxisOrder"`
HorizontalAxisLimit string `json:"horizontalAxisLimit"`
VerticalAxisOperation string `json:"verticalAxisOperation"`
VerticalAxisField string `json:"verticalAxisField"`
BreakDownBy string `json:"breakDownBy"`
BreakDownByFields []string `json:"breakDownByFields"`
BreakDownByFilters []string `json:"breakDownByFilters"`
}
AggregationOptions is the structure of the options for an aggregation. It contains all the fields, which are required to build the query for the choosen chart type.
type AggregationTimes ¶
AggregationTimes is the structure, which defines the time interval for the aggregation.
type Bucket ¶
Bucket is the struct which is used to represent the distribution of the returned rows for a logs query for the given time range.
type Config ¶
type Config struct {
Address string `json:"address"`
Database string `json:"database"`
Username string `json:"username"`
Password string `json:"password"`
DialTimeout string `json:"dialTimeout"`
ConnMaxLifetime string `json:"connMaxLifetime"`
MaxIdleConns int `json:"maxIdleConns"`
MaxOpenConns int `json:"maxOpenConns"`
MaterializedColumns []string `json:"materializedColumns"`
}
Config is the structure of the configuration for a single klogs instance.
type Instance ¶
type Instance interface {
GetName() string
GetFields(filter string, fieldType string) []string
GetLogs(ctx context.Context, query, order, orderBy string, limit, timeStart, timeEnd int64) ([]map[string]any, []string, int64, int64, []Bucket, error)
GetRawQueryResults(ctx context.Context, query string) ([][]any, []string, error)
GetAggregation(ctx context.Context, aggregation Aggregation) ([]map[string]any, []string, error)
// contains filtered or unexported methods
}
type Row ¶
type Row struct {
Timestamp time.Time
Cluster string
Namespace string
App string
Pod string
Container string
Host string
FieldsString map[string]string
FieldsNumber map[string]float64
Log string
}
Row is the struct which represents a single row in the logs table of ClickHouse.
type VisualizationRow ¶
VisualizationRow is the structure of a single row for a visualization.