Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 { Name string `json:"name"` DisplayName string `json:"displayName"` Description string `json:"description"` Address string `json:"address"` Database string `json:"database"` Username string `json:"username"` Password string `json:"password"` WriteTimeout string `json:"writeTimeout"` ReadTimeout string `json:"readTimeout"` MaterializedColumns []string `json:"materializedColumns"` }
Config is the structure of the configuration for a single ClickHouse instance.
type FieldNumber ¶
FieldNumber is the struct for the nested fields for all JSON fields of a log line, which are containing a number.
type FieldString ¶
FieldString is the struct for the nested fields for all JSON fields of a log line, which are containing a string.
type Instance ¶
type Instance struct { Name string // contains filtered or unexported fields }
Instance represents a single ClickHouse instance, which can be added via the configuration file.
func (*Instance) GetAggregation ¶
func (i *Instance) GetAggregation(ctx context.Context, limit int64, groupBy, operation, operationField, order, query string, timeStart, timeEnd int64) ([]VisualizationRow, error)
GetAggregation build an aggregation query for the given parameters and returns the result as slice of label, value pairs.
func (*Instance) GetLogs ¶
func (i *Instance) GetLogs(ctx context.Context, query, order, orderBy string, timeStart, timeEnd int64) ([]map[string]interface{}, []string, int64, int64, []Bucket, error)
GetLogs parses the given query into the sql syntax, which is then run against the ClickHouse instance. The returned rows are converted into a document schema which can be used by our UI.
type Row ¶
type Row struct { Timestamp time.Time Cluster string Namespace string App string Pod string Container string Host string FieldsString FieldString FieldsNumber FieldNumber 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.