File: query.proto

package info (click to toggle)
golang-github-humanlogio-api 0.0~git20250305.fa41d14-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,352 kB
  • sloc: sh: 45; makefile: 8
file content (66 lines) | stat: -rw-r--r-- 1,577 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
syntax = "proto3";

package types.v1;

import "google/protobuf/timestamp.proto";
import "types/v1/logevent.proto";
import "types/v1/logquery.proto";
import "types/v1/types.proto";

option go_package = "types/v1;typesv1";

message Data {
  message SubQueries {
    repeated types.v1.LogQuery queries = 1;
  }

  oneof shape {
    // SubQueries need to be further queried to obtain actual data.
    SubQueries subqueries = 101;
    // tabular is data that has a table header, followed by rows that match the
    // header
    Tabular tabular = 201;
    // single_value is a single value
    Val single_value = 301;
    // scalar timeseries data is a list of [ts, scalar] where scalar is usually
    // a numeric value
    ScalarTimeseries scalar_timeseries = 401;
    // vector timeseries data is a list of [ts, [scalar0, ..., scalarN]] where
    // scalar is usually a numeric value
    VectorTimeseries vector_timeseries = 402;
  }
}

message Tabular {
  oneof shape {
    LogEvents log_events = 201;
    Table free_form = 202;
  }
}

message ScalarTimeseries {
  // scalars will contain only this type of value
  VarType type = 2;
  repeated ScalarTimestamp scalars = 3;
}

message LogEvents {
  repeated IngestedLogEvent events = 1;
}

message ScalarTimestamp {
  google.protobuf.Timestamp ts = 1;
  Scalar scalar = 2;
}

message VectorTimeseries {
  Obj context = 1;
  // vectors will contain only this type of value
  VarType type = 2;
  repeated VectorTimestamp vectors = 3;
}

message VectorTimestamp {
  google.protobuf.Timestamp ts = 1;
  repeated Scalar vector = 2;
}