syntax = "proto3"; package logproto; import "google/protobuf/timestamp.proto"; import "github.com/gogo/protobuf/gogoproto/gogo.proto"; service Pusher { rpc Push(PushRequest) returns (PushResponse) {}; } service Querier { rpc Query(QueryRequest) returns (stream QueryResponse) {}; rpc Label(LabelRequest) returns (LabelResponse) {}; } message PushRequest { repeated Stream streams = 1 [(gogoproto.jsontag) = "streams"]; } message PushResponse { } message QueryRequest { string query = 1; uint32 limit = 2; google.protobuf.Timestamp start = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; google.protobuf.Timestamp end = 4 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false]; Direction direction = 5; string regex = 6; } enum Direction { FORWARD = 0; BACKWARD = 1; } message QueryResponse { repeated Stream streams = 1; } message LabelRequest { string name = 1; bool values = 2; // True to fetch label values, false for fetch labels names. } message LabelResponse { repeated string values = 1; } message Stream { string labels = 1 [(gogoproto.jsontag) = "labels"]; repeated Entry entries = 2 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "entries"]; } message Entry { google.protobuf.Timestamp timestamp = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false, (gogoproto.jsontag) = "ts"]; string line = 2 [(gogoproto.jsontag) = "line"]; }