/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ syntax = "proto3"; package prometheus; option java_package = "org.apache.horaedb.proto.internal"; option java_outer_classname = "Prometheus"; option go_package = "github.com/apache/incubator-horaedb-proto/golang/pkg/horaeprompb"; message Expr { oneof node { Operand operand = 1; SubExpr sub_expr = 2; }; } message SubExpr { enum OperatorType { AGGR = 0; FUNC = 1; BINARY = 2; } OperatorType op_type = 1; string operator = 2; repeated Expr operands = 3; // for aggr repeated string group = 4; bool without = 5; // Not used for now // for binaryExpr // bool return_bool = 6; // bool rhs_contains_metric = 7; } message Operand { oneof value { double float_val = 1; string string_val = 2; Selector selector = 3; } } enum FilterType { LITERAL_OR = 0; NOT_LITERAL_OR = 1; REGEXP = 2; NOT_REGEXP_MATCH = 3; } message FilterOperator { FilterType filter_type = 1; repeated string params = 2; } message Filter { string tag_key = 1; repeated FilterOperator operators = 2; } message Selector { string measurement = 1; repeated Filter filters = 2; int64 start = 3; int64 end = 4; int64 align_start = 5; int64 align_end = 6; int64 step = 7; int64 range = 8; int64 offset = 9; string field = 10; } message Sample { double value = 1; int64 timestamp = 2; } message TimeSeries { repeated Label labels = 1; repeated Sample samples = 2; } message Label { string name = 1; string value = 2; } message Labels { repeated Label labels = 1; }