feat: add go protobuf generation (#6)

* feat: add go protobuf generation

* ci: check go protbuf generation

* refactor: use 'namely/protoc-all:1.51_1' to compile the proto instead of locally binary

* refactor: no need to add the 'bin/' igore

* chore: modify code format

* refactor: add some comments to describe our modification
This commit is contained in:
zyy17
2023-02-15 15:10:17 +08:00
committed by GitHub
parent 3e6349be12
commit 36147379c3
33 changed files with 9755 additions and 8 deletions
+8
View File
@@ -26,6 +26,10 @@ jobs:
timeout-minutes: 60 timeout-minutes: 60
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: "1.18.4"
- uses: arduino/setup-protoc@v1 - uses: arduino/setup-protoc@v1
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
@@ -36,6 +40,10 @@ jobs:
uses: Swatinem/rust-cache@v2 uses: Swatinem/rust-cache@v2
- name: Run cargo check - name: Run cargo check
run: cargo check --workspace --all-targets run: cargo check --workspace --all-targets
- name: Check Go protbuf generation
run: |
make go
git diff --exit-code
fmt: fmt:
name: Rustfmt name: Rustfmt
+12 -2
View File
@@ -1,6 +1,16 @@
.PHONY: all rust .PHONY: all rust go go-deps
all: rust BUILDER_CONTAINER=namely/protoc-all:1.51_1
all: rust go
rust: rust:
cargo build cargo build
go: go-deps
docker run -t -w /greptime-proto \
--entrypoint ./scripts/generate-go.sh \
-v ${PWD}:/greptime-proto ${BUILDER_CONTAINER}
go-deps:
go mod download
+30 -3
View File
@@ -10,10 +10,20 @@ GreptimeDB protobuf files.
### Command ### Command
```text - **Compile for Rust**
make
```console
make rust
``` ```
- **Compile for Go**
```console
make go
```
The compilation will use builder container `namely/protoc-all`.
## Usage ## Usage
### Rust ### Rust
@@ -34,6 +44,23 @@ use greptime_proto::v1::meta::*;
use greptime_proto::prometheus::remote::*; use greptime_proto::prometheus::remote::*;
``` ```
### Go
Download the go module:
```console
go get github.com/GreptimeTeam/greptime-proto@main
```
Then use greptime-proto as the normal Go module:
```go
import (
greptimev1 "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"
)
...
```
## For SDK developers ## For SDK developers
GreptimeDB's gRPC service is built on top of [Arrow Flight RPC](https://arrow.apache.org/docs/format/Flight.html). You can find the Arrow's official implementation status of each programming language [here](https://arrow.apache.org/docs/status.html#flight-rpc). GreptimeDB's gRPC service is built on top of [Arrow Flight RPC](https://arrow.apache.org/docs/format/Flight.html). You can find the Arrow's official implementation status of each programming language [here](https://arrow.apache.org/docs/status.html#flight-rpc).
@@ -42,7 +69,7 @@ GreptimeDB's gRPC service is built on top of [Arrow Flight RPC](https://arrow.ap
Once the Arrow Flight client is ready, you only need to care about the following 3 protobuf files to accomplish our SDK writing: Once the Arrow Flight client is ready, you only need to care about the following 3 protobuf files to accomplish our SDK writing:
```text ```console
. .
├── greptime ├── greptime
│   └── v1 │   └── v1
+16
View File
@@ -0,0 +1,16 @@
module github.com/GreptimeTeam/greptime-proto
go 1.18
require (
google.golang.org/grpc v1.53.0
google.golang.org/protobuf v1.28.1
)
require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
)
+20
View File
@@ -0,0 +1,20 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw=
golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w=
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc=
google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+722
View File
@@ -0,0 +1,722 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/column.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ColumnDataType int32
const (
ColumnDataType_BOOLEAN ColumnDataType = 0
ColumnDataType_INT8 ColumnDataType = 1
ColumnDataType_INT16 ColumnDataType = 2
ColumnDataType_INT32 ColumnDataType = 3
ColumnDataType_INT64 ColumnDataType = 4
ColumnDataType_UINT8 ColumnDataType = 5
ColumnDataType_UINT16 ColumnDataType = 6
ColumnDataType_UINT32 ColumnDataType = 7
ColumnDataType_UINT64 ColumnDataType = 8
ColumnDataType_FLOAT32 ColumnDataType = 9
ColumnDataType_FLOAT64 ColumnDataType = 10
ColumnDataType_BINARY ColumnDataType = 11
ColumnDataType_STRING ColumnDataType = 12
ColumnDataType_DATE ColumnDataType = 13
ColumnDataType_DATETIME ColumnDataType = 14
ColumnDataType_TIMESTAMP_SECOND ColumnDataType = 15
ColumnDataType_TIMESTAMP_MILLISECOND ColumnDataType = 16
ColumnDataType_TIMESTAMP_MICROSECOND ColumnDataType = 17
ColumnDataType_TIMESTAMP_NANOSECOND ColumnDataType = 18
)
// Enum value maps for ColumnDataType.
var (
ColumnDataType_name = map[int32]string{
0: "BOOLEAN",
1: "INT8",
2: "INT16",
3: "INT32",
4: "INT64",
5: "UINT8",
6: "UINT16",
7: "UINT32",
8: "UINT64",
9: "FLOAT32",
10: "FLOAT64",
11: "BINARY",
12: "STRING",
13: "DATE",
14: "DATETIME",
15: "TIMESTAMP_SECOND",
16: "TIMESTAMP_MILLISECOND",
17: "TIMESTAMP_MICROSECOND",
18: "TIMESTAMP_NANOSECOND",
}
ColumnDataType_value = map[string]int32{
"BOOLEAN": 0,
"INT8": 1,
"INT16": 2,
"INT32": 3,
"INT64": 4,
"UINT8": 5,
"UINT16": 6,
"UINT32": 7,
"UINT64": 8,
"FLOAT32": 9,
"FLOAT64": 10,
"BINARY": 11,
"STRING": 12,
"DATE": 13,
"DATETIME": 14,
"TIMESTAMP_SECOND": 15,
"TIMESTAMP_MILLISECOND": 16,
"TIMESTAMP_MICROSECOND": 17,
"TIMESTAMP_NANOSECOND": 18,
}
)
func (x ColumnDataType) Enum() *ColumnDataType {
p := new(ColumnDataType)
*p = x
return p
}
func (x ColumnDataType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ColumnDataType) Descriptor() protoreflect.EnumDescriptor {
return file_greptime_v1_column_proto_enumTypes[0].Descriptor()
}
func (ColumnDataType) Type() protoreflect.EnumType {
return &file_greptime_v1_column_proto_enumTypes[0]
}
func (x ColumnDataType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ColumnDataType.Descriptor instead.
func (ColumnDataType) EnumDescriptor() ([]byte, []int) {
return file_greptime_v1_column_proto_rawDescGZIP(), []int{0}
}
type Column_SemanticType int32
const (
Column_TAG Column_SemanticType = 0
Column_FIELD Column_SemanticType = 1
Column_TIMESTAMP Column_SemanticType = 2
)
// Enum value maps for Column_SemanticType.
var (
Column_SemanticType_name = map[int32]string{
0: "TAG",
1: "FIELD",
2: "TIMESTAMP",
}
Column_SemanticType_value = map[string]int32{
"TAG": 0,
"FIELD": 1,
"TIMESTAMP": 2,
}
)
func (x Column_SemanticType) Enum() *Column_SemanticType {
p := new(Column_SemanticType)
*p = x
return p
}
func (x Column_SemanticType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Column_SemanticType) Descriptor() protoreflect.EnumDescriptor {
return file_greptime_v1_column_proto_enumTypes[1].Descriptor()
}
func (Column_SemanticType) Type() protoreflect.EnumType {
return &file_greptime_v1_column_proto_enumTypes[1]
}
func (x Column_SemanticType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Column_SemanticType.Descriptor instead.
func (Column_SemanticType) EnumDescriptor() ([]byte, []int) {
return file_greptime_v1_column_proto_rawDescGZIP(), []int{0, 0}
}
type Column struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ColumnName string `protobuf:"bytes,1,opt,name=column_name,json=columnName,proto3" json:"column_name,omitempty"`
SemanticType Column_SemanticType `protobuf:"varint,2,opt,name=semantic_type,json=semanticType,proto3,enum=greptime.v1.Column_SemanticType" json:"semantic_type,omitempty"`
// The array of non-null values in this column.
//
// For example: suppose there is a column "foo" that contains some int32 values (1, 2, 3, 4, 5, null, 7, 8, 9, null);
//
// column:
// column_name: foo
// semantic_type: Tag
// values: 1, 2, 3, 4, 5, 7, 8, 9
// null_masks: 00100000 00000010
Values *Column_Values `protobuf:"bytes,3,opt,name=values,proto3" json:"values,omitempty"`
// Mask maps the positions of null values.
// If a bit in null_mask is 1, it indicates that the column value at that position is null.
NullMask []byte `protobuf:"bytes,4,opt,name=null_mask,json=nullMask,proto3" json:"null_mask,omitempty"`
// Helpful in creating vector from column.
Datatype ColumnDataType `protobuf:"varint,5,opt,name=datatype,proto3,enum=greptime.v1.ColumnDataType" json:"datatype,omitempty"`
}
func (x *Column) Reset() {
*x = Column{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_column_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Column) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Column) ProtoMessage() {}
func (x *Column) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_column_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Column.ProtoReflect.Descriptor instead.
func (*Column) Descriptor() ([]byte, []int) {
return file_greptime_v1_column_proto_rawDescGZIP(), []int{0}
}
func (x *Column) GetColumnName() string {
if x != nil {
return x.ColumnName
}
return ""
}
func (x *Column) GetSemanticType() Column_SemanticType {
if x != nil {
return x.SemanticType
}
return Column_TAG
}
func (x *Column) GetValues() *Column_Values {
if x != nil {
return x.Values
}
return nil
}
func (x *Column) GetNullMask() []byte {
if x != nil {
return x.NullMask
}
return nil
}
func (x *Column) GetDatatype() ColumnDataType {
if x != nil {
return x.Datatype
}
return ColumnDataType_BOOLEAN
}
type ColumnDef struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Datatype ColumnDataType `protobuf:"varint,2,opt,name=datatype,proto3,enum=greptime.v1.ColumnDataType" json:"datatype,omitempty"`
IsNullable bool `protobuf:"varint,3,opt,name=is_nullable,json=isNullable,proto3" json:"is_nullable,omitempty"`
DefaultConstraint []byte `protobuf:"bytes,4,opt,name=default_constraint,json=defaultConstraint,proto3" json:"default_constraint,omitempty"`
}
func (x *ColumnDef) Reset() {
*x = ColumnDef{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_column_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ColumnDef) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ColumnDef) ProtoMessage() {}
func (x *ColumnDef) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_column_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ColumnDef.ProtoReflect.Descriptor instead.
func (*ColumnDef) Descriptor() ([]byte, []int) {
return file_greptime_v1_column_proto_rawDescGZIP(), []int{1}
}
func (x *ColumnDef) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *ColumnDef) GetDatatype() ColumnDataType {
if x != nil {
return x.Datatype
}
return ColumnDataType_BOOLEAN
}
func (x *ColumnDef) GetIsNullable() bool {
if x != nil {
return x.IsNullable
}
return false
}
func (x *ColumnDef) GetDefaultConstraint() []byte {
if x != nil {
return x.DefaultConstraint
}
return nil
}
type Column_Values struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
I8Values []int32 `protobuf:"varint,1,rep,packed,name=i8_values,json=i8Values,proto3" json:"i8_values,omitempty"`
I16Values []int32 `protobuf:"varint,2,rep,packed,name=i16_values,json=i16Values,proto3" json:"i16_values,omitempty"`
I32Values []int32 `protobuf:"varint,3,rep,packed,name=i32_values,json=i32Values,proto3" json:"i32_values,omitempty"`
I64Values []int64 `protobuf:"varint,4,rep,packed,name=i64_values,json=i64Values,proto3" json:"i64_values,omitempty"`
U8Values []uint32 `protobuf:"varint,5,rep,packed,name=u8_values,json=u8Values,proto3" json:"u8_values,omitempty"`
U16Values []uint32 `protobuf:"varint,6,rep,packed,name=u16_values,json=u16Values,proto3" json:"u16_values,omitempty"`
U32Values []uint32 `protobuf:"varint,7,rep,packed,name=u32_values,json=u32Values,proto3" json:"u32_values,omitempty"`
U64Values []uint64 `protobuf:"varint,8,rep,packed,name=u64_values,json=u64Values,proto3" json:"u64_values,omitempty"`
F32Values []float32 `protobuf:"fixed32,9,rep,packed,name=f32_values,json=f32Values,proto3" json:"f32_values,omitempty"`
F64Values []float64 `protobuf:"fixed64,10,rep,packed,name=f64_values,json=f64Values,proto3" json:"f64_values,omitempty"`
BoolValues []bool `protobuf:"varint,11,rep,packed,name=bool_values,json=boolValues,proto3" json:"bool_values,omitempty"`
BinaryValues [][]byte `protobuf:"bytes,12,rep,name=binary_values,json=binaryValues,proto3" json:"binary_values,omitempty"`
StringValues []string `protobuf:"bytes,13,rep,name=string_values,json=stringValues,proto3" json:"string_values,omitempty"`
DateValues []int32 `protobuf:"varint,14,rep,packed,name=date_values,json=dateValues,proto3" json:"date_values,omitempty"`
DatetimeValues []int64 `protobuf:"varint,15,rep,packed,name=datetime_values,json=datetimeValues,proto3" json:"datetime_values,omitempty"`
TsSecondValues []int64 `protobuf:"varint,16,rep,packed,name=ts_second_values,json=tsSecondValues,proto3" json:"ts_second_values,omitempty"`
TsMillisecondValues []int64 `protobuf:"varint,17,rep,packed,name=ts_millisecond_values,json=tsMillisecondValues,proto3" json:"ts_millisecond_values,omitempty"`
TsMicrosecondValues []int64 `protobuf:"varint,18,rep,packed,name=ts_microsecond_values,json=tsMicrosecondValues,proto3" json:"ts_microsecond_values,omitempty"`
TsNanosecondValues []int64 `protobuf:"varint,19,rep,packed,name=ts_nanosecond_values,json=tsNanosecondValues,proto3" json:"ts_nanosecond_values,omitempty"`
}
func (x *Column_Values) Reset() {
*x = Column_Values{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_column_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Column_Values) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Column_Values) ProtoMessage() {}
func (x *Column_Values) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_column_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Column_Values.ProtoReflect.Descriptor instead.
func (*Column_Values) Descriptor() ([]byte, []int) {
return file_greptime_v1_column_proto_rawDescGZIP(), []int{0, 0}
}
func (x *Column_Values) GetI8Values() []int32 {
if x != nil {
return x.I8Values
}
return nil
}
func (x *Column_Values) GetI16Values() []int32 {
if x != nil {
return x.I16Values
}
return nil
}
func (x *Column_Values) GetI32Values() []int32 {
if x != nil {
return x.I32Values
}
return nil
}
func (x *Column_Values) GetI64Values() []int64 {
if x != nil {
return x.I64Values
}
return nil
}
func (x *Column_Values) GetU8Values() []uint32 {
if x != nil {
return x.U8Values
}
return nil
}
func (x *Column_Values) GetU16Values() []uint32 {
if x != nil {
return x.U16Values
}
return nil
}
func (x *Column_Values) GetU32Values() []uint32 {
if x != nil {
return x.U32Values
}
return nil
}
func (x *Column_Values) GetU64Values() []uint64 {
if x != nil {
return x.U64Values
}
return nil
}
func (x *Column_Values) GetF32Values() []float32 {
if x != nil {
return x.F32Values
}
return nil
}
func (x *Column_Values) GetF64Values() []float64 {
if x != nil {
return x.F64Values
}
return nil
}
func (x *Column_Values) GetBoolValues() []bool {
if x != nil {
return x.BoolValues
}
return nil
}
func (x *Column_Values) GetBinaryValues() [][]byte {
if x != nil {
return x.BinaryValues
}
return nil
}
func (x *Column_Values) GetStringValues() []string {
if x != nil {
return x.StringValues
}
return nil
}
func (x *Column_Values) GetDateValues() []int32 {
if x != nil {
return x.DateValues
}
return nil
}
func (x *Column_Values) GetDatetimeValues() []int64 {
if x != nil {
return x.DatetimeValues
}
return nil
}
func (x *Column_Values) GetTsSecondValues() []int64 {
if x != nil {
return x.TsSecondValues
}
return nil
}
func (x *Column_Values) GetTsMillisecondValues() []int64 {
if x != nil {
return x.TsMillisecondValues
}
return nil
}
func (x *Column_Values) GetTsMicrosecondValues() []int64 {
if x != nil {
return x.TsMicrosecondValues
}
return nil
}
func (x *Column_Values) GetTsNanosecondValues() []int64 {
if x != nil {
return x.TsNanosecondValues
}
return nil
}
var File_greptime_v1_column_proto protoreflect.FileDescriptor
var file_greptime_v1_column_proto_rawDesc = []byte{
0x0a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f,
0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x22, 0xe3, 0x07, 0x0a, 0x06, 0x43, 0x6f, 0x6c, 0x75,
0x6d, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6e, 0x61, 0x6d,
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4e,
0x61, 0x6d, 0x65, 0x12, 0x45, 0x0a, 0x0d, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e,
0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x73, 0x65,
0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1b,
0x0a, 0x09, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28,
0x0c, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x37, 0x0a, 0x08, 0x64,
0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e,
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75,
0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61,
0x74, 0x79, 0x70, 0x65, 0x1a, 0xb3, 0x05, 0x0a, 0x06, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12,
0x1b, 0x0a, 0x09, 0x69, 0x38, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
0x28, 0x05, 0x52, 0x08, 0x69, 0x38, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a,
0x69, 0x31, 0x36, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x05,
0x52, 0x09, 0x69, 0x31, 0x36, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69,
0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x05, 0x52,
0x09, 0x69, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x36,
0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x03, 0x52, 0x09,
0x69, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x75, 0x38, 0x5f,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x08, 0x75, 0x38,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x31, 0x36, 0x5f, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x31, 0x36, 0x56,
0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x33, 0x32, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75,
0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x04, 0x52, 0x09, 0x75, 0x36, 0x34, 0x56, 0x61, 0x6c,
0x75, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x33, 0x32, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x02, 0x52, 0x09, 0x66, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x18, 0x0a, 0x20, 0x03, 0x28, 0x01, 0x52, 0x09, 0x66, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65,
0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x18, 0x0b, 0x20, 0x03, 0x28, 0x08, 0x52, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75,
0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x5f, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x69, 0x6e, 0x61, 0x72,
0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x74, 0x72, 0x69, 0x6e,
0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c,
0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b,
0x64, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28,
0x05, 0x52, 0x0a, 0x64, 0x61, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x27, 0x0a,
0x0f, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x18, 0x0f, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0e, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x73, 0x5f, 0x73, 0x65, 0x63,
0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x03,
0x52, 0x0e, 0x74, 0x73, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x12, 0x32, 0x0a, 0x15, 0x74, 0x73, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x11, 0x20, 0x03, 0x28, 0x03, 0x52,
0x13, 0x74, 0x73, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61,
0x6c, 0x75, 0x65, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x74, 0x73, 0x5f, 0x6d, 0x69, 0x63, 0x72, 0x6f,
0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x12, 0x20,
0x03, 0x28, 0x03, 0x52, 0x13, 0x74, 0x73, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f,
0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x73, 0x5f, 0x6e,
0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73,
0x18, 0x13, 0x20, 0x03, 0x28, 0x03, 0x52, 0x12, 0x74, 0x73, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x65,
0x63, 0x6f, 0x6e, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x31, 0x0a, 0x0c, 0x53, 0x65,
0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x41,
0x47, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x49, 0x45, 0x4c, 0x44, 0x10, 0x01, 0x12, 0x0d,
0x0a, 0x09, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x10, 0x02, 0x22, 0xa8, 0x01,
0x0a, 0x09, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
0x37, 0x0a, 0x08, 0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
0x0e, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08,
0x64, 0x61, 0x74, 0x61, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x6e,
0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69,
0x73, 0x4e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x64, 0x65, 0x66,
0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x18,
0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x6f,
0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74, 0x2a, 0xa7, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6c,
0x75, 0x6d, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x42,
0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x54, 0x38,
0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x02, 0x12, 0x09, 0x0a,
0x05, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x54, 0x36,
0x34, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x49, 0x4e, 0x54, 0x38, 0x10, 0x05, 0x12, 0x0a,
0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x31, 0x36, 0x10, 0x06, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49,
0x4e, 0x54, 0x33, 0x32, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34,
0x10, 0x08, 0x12, 0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x33, 0x32, 0x10, 0x09, 0x12,
0x0b, 0x0a, 0x07, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x36, 0x34, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06,
0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0b, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x52, 0x49,
0x4e, 0x47, 0x10, 0x0c, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x41, 0x54, 0x45, 0x10, 0x0d, 0x12, 0x0c,
0x0a, 0x08, 0x44, 0x41, 0x54, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x0e, 0x12, 0x14, 0x0a, 0x10,
0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44,
0x10, 0x0f, 0x12, 0x19, 0x0a, 0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f,
0x4d, 0x49, 0x4c, 0x4c, 0x49, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x10, 0x12, 0x19, 0x0a,
0x15, 0x54, 0x49, 0x4d, 0x45, 0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4d, 0x49, 0x43, 0x52, 0x4f,
0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x11, 0x12, 0x18, 0x0a, 0x14, 0x54, 0x49, 0x4d, 0x45,
0x53, 0x54, 0x41, 0x4d, 0x50, 0x5f, 0x4e, 0x41, 0x4e, 0x4f, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44,
0x10, 0x12, 0x42, 0x50, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x5a, 0x35, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69,
0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_column_proto_rawDescOnce sync.Once
file_greptime_v1_column_proto_rawDescData = file_greptime_v1_column_proto_rawDesc
)
func file_greptime_v1_column_proto_rawDescGZIP() []byte {
file_greptime_v1_column_proto_rawDescOnce.Do(func() {
file_greptime_v1_column_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_column_proto_rawDescData)
})
return file_greptime_v1_column_proto_rawDescData
}
var file_greptime_v1_column_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_greptime_v1_column_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_greptime_v1_column_proto_goTypes = []interface{}{
(ColumnDataType)(0), // 0: greptime.v1.ColumnDataType
(Column_SemanticType)(0), // 1: greptime.v1.Column.SemanticType
(*Column)(nil), // 2: greptime.v1.Column
(*ColumnDef)(nil), // 3: greptime.v1.ColumnDef
(*Column_Values)(nil), // 4: greptime.v1.Column.Values
}
var file_greptime_v1_column_proto_depIdxs = []int32{
1, // 0: greptime.v1.Column.semantic_type:type_name -> greptime.v1.Column.SemanticType
4, // 1: greptime.v1.Column.values:type_name -> greptime.v1.Column.Values
0, // 2: greptime.v1.Column.datatype:type_name -> greptime.v1.ColumnDataType
0, // 3: greptime.v1.ColumnDef.datatype:type_name -> greptime.v1.ColumnDataType
4, // [4:4] is the sub-list for method output_type
4, // [4:4] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_greptime_v1_column_proto_init() }
func file_greptime_v1_column_proto_init() {
if File_greptime_v1_column_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_greptime_v1_column_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Column); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_column_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ColumnDef); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_column_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Column_Values); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_column_proto_rawDesc,
NumEnums: 2,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_greptime_v1_column_proto_goTypes,
DependencyIndexes: file_greptime_v1_column_proto_depIdxs,
EnumInfos: file_greptime_v1_column_proto_enumTypes,
MessageInfos: file_greptime_v1_column_proto_msgTypes,
}.Build()
File_greptime_v1_column_proto = out.File
file_greptime_v1_column_proto_rawDesc = nil
file_greptime_v1_column_proto_goTypes = nil
file_greptime_v1_column_proto_depIdxs = nil
}
+637
View File
@@ -0,0 +1,637 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/database.proto
package v1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type RequestHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The `catalog` that is selected to be used in this request.
Catalog string `protobuf:"bytes,1,opt,name=catalog,proto3" json:"catalog,omitempty"`
// The `schema` that is selected to be used in this request.
Schema string `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"`
}
func (x *RequestHeader) Reset() {
*x = RequestHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_database_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestHeader) ProtoMessage() {}
func (x *RequestHeader) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_database_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestHeader.ProtoReflect.Descriptor instead.
func (*RequestHeader) Descriptor() ([]byte, []int) {
return file_greptime_v1_database_proto_rawDescGZIP(), []int{0}
}
func (x *RequestHeader) GetCatalog() string {
if x != nil {
return x.Catalog
}
return ""
}
func (x *RequestHeader) GetSchema() string {
if x != nil {
return x.Schema
}
return ""
}
type GreptimeRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// Types that are assignable to Request:
//
// *GreptimeRequest_Insert
// *GreptimeRequest_Query
// *GreptimeRequest_Ddl
Request isGreptimeRequest_Request `protobuf_oneof:"request"`
}
func (x *GreptimeRequest) Reset() {
*x = GreptimeRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_database_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GreptimeRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GreptimeRequest) ProtoMessage() {}
func (x *GreptimeRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_database_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GreptimeRequest.ProtoReflect.Descriptor instead.
func (*GreptimeRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_database_proto_rawDescGZIP(), []int{1}
}
func (x *GreptimeRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (m *GreptimeRequest) GetRequest() isGreptimeRequest_Request {
if m != nil {
return m.Request
}
return nil
}
func (x *GreptimeRequest) GetInsert() *InsertRequest {
if x, ok := x.GetRequest().(*GreptimeRequest_Insert); ok {
return x.Insert
}
return nil
}
func (x *GreptimeRequest) GetQuery() *QueryRequest {
if x, ok := x.GetRequest().(*GreptimeRequest_Query); ok {
return x.Query
}
return nil
}
func (x *GreptimeRequest) GetDdl() *DdlRequest {
if x, ok := x.GetRequest().(*GreptimeRequest_Ddl); ok {
return x.Ddl
}
return nil
}
type isGreptimeRequest_Request interface {
isGreptimeRequest_Request()
}
type GreptimeRequest_Insert struct {
Insert *InsertRequest `protobuf:"bytes,2,opt,name=insert,proto3,oneof"`
}
type GreptimeRequest_Query struct {
Query *QueryRequest `protobuf:"bytes,3,opt,name=query,proto3,oneof"`
}
type GreptimeRequest_Ddl struct {
Ddl *DdlRequest `protobuf:"bytes,4,opt,name=ddl,proto3,oneof"`
}
func (*GreptimeRequest_Insert) isGreptimeRequest_Request() {}
func (*GreptimeRequest_Query) isGreptimeRequest_Request() {}
func (*GreptimeRequest_Ddl) isGreptimeRequest_Request() {}
type QueryRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Types that are assignable to Query:
//
// *QueryRequest_Sql
// *QueryRequest_LogicalPlan
Query isQueryRequest_Query `protobuf_oneof:"query"`
}
func (x *QueryRequest) Reset() {
*x = QueryRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_database_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryRequest) ProtoMessage() {}
func (x *QueryRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_database_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead.
func (*QueryRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_database_proto_rawDescGZIP(), []int{2}
}
func (m *QueryRequest) GetQuery() isQueryRequest_Query {
if m != nil {
return m.Query
}
return nil
}
func (x *QueryRequest) GetSql() string {
if x, ok := x.GetQuery().(*QueryRequest_Sql); ok {
return x.Sql
}
return ""
}
func (x *QueryRequest) GetLogicalPlan() []byte {
if x, ok := x.GetQuery().(*QueryRequest_LogicalPlan); ok {
return x.LogicalPlan
}
return nil
}
type isQueryRequest_Query interface {
isQueryRequest_Query()
}
type QueryRequest_Sql struct {
Sql string `protobuf:"bytes,1,opt,name=sql,proto3,oneof"`
}
type QueryRequest_LogicalPlan struct {
LogicalPlan []byte `protobuf:"bytes,2,opt,name=logical_plan,json=logicalPlan,proto3,oneof"`
}
func (*QueryRequest_Sql) isQueryRequest_Query() {}
func (*QueryRequest_LogicalPlan) isQueryRequest_Query() {}
type InsertRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
// Data is represented here.
Columns []*Column `protobuf:"bytes,3,rep,name=columns,proto3" json:"columns,omitempty"`
// The row_count of all columns, which include null and non-null values.
//
// Note: the row_count of all columns in a InsertRequest must be same.
RowCount uint32 `protobuf:"varint,4,opt,name=row_count,json=rowCount,proto3" json:"row_count,omitempty"`
// The region number of current insert request.
RegionNumber uint32 `protobuf:"varint,5,opt,name=region_number,json=regionNumber,proto3" json:"region_number,omitempty"`
}
func (x *InsertRequest) Reset() {
*x = InsertRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_database_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *InsertRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InsertRequest) ProtoMessage() {}
func (x *InsertRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_database_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InsertRequest.ProtoReflect.Descriptor instead.
func (*InsertRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_database_proto_rawDescGZIP(), []int{3}
}
func (x *InsertRequest) GetTableName() string {
if x != nil {
return x.TableName
}
return ""
}
func (x *InsertRequest) GetColumns() []*Column {
if x != nil {
return x.Columns
}
return nil
}
func (x *InsertRequest) GetRowCount() uint32 {
if x != nil {
return x.RowCount
}
return 0
}
func (x *InsertRequest) GetRegionNumber() uint32 {
if x != nil {
return x.RegionNumber
}
return 0
}
type AffectedRows struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Value uint32 `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *AffectedRows) Reset() {
*x = AffectedRows{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_database_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AffectedRows) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AffectedRows) ProtoMessage() {}
func (x *AffectedRows) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_database_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AffectedRows.ProtoReflect.Descriptor instead.
func (*AffectedRows) Descriptor() ([]byte, []int) {
return file_greptime_v1_database_proto_rawDescGZIP(), []int{4}
}
func (x *AffectedRows) GetValue() uint32 {
if x != nil {
return x.Value
}
return 0
}
type FlightMetadata struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
AffectedRows *AffectedRows `protobuf:"bytes,1,opt,name=affected_rows,json=affectedRows,proto3" json:"affected_rows,omitempty"`
}
func (x *FlightMetadata) Reset() {
*x = FlightMetadata{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_database_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *FlightMetadata) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*FlightMetadata) ProtoMessage() {}
func (x *FlightMetadata) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_database_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use FlightMetadata.ProtoReflect.Descriptor instead.
func (*FlightMetadata) Descriptor() ([]byte, []int) {
return file_greptime_v1_database_proto_rawDescGZIP(), []int{5}
}
func (x *FlightMetadata) GetAffectedRows() *AffectedRows {
if x != nil {
return x.AffectedRows
}
return nil
}
var File_greptime_v1_database_proto protoreflect.FileDescriptor
var file_greptime_v1_database_proto_rawDesc = []byte{
0x0a, 0x1a, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x61,
0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x67, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x15, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x64, 0x64, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x18, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f,
0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x0d, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63,
0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x61,
0x74, 0x61, 0x6c, 0x6f, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xe6, 0x01,
0x0a, 0x0f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68,
0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x48, 0x00, 0x52, 0x06, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x71,
0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x2b,
0x0a, 0x03, 0x64, 0x64, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x64, 0x6c, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x48, 0x00, 0x52, 0x03, 0x64, 0x64, 0x6c, 0x42, 0x09, 0x0a, 0x07, 0x72,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x50, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x03, 0x73, 0x71, 0x6c, 0x18, 0x01, 0x20,
0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x73, 0x71, 0x6c, 0x12, 0x23, 0x0a, 0x0c, 0x6c, 0x6f,
0x67, 0x69, 0x63, 0x61, 0x6c, 0x5f, 0x70, 0x6c, 0x61, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
0x48, 0x00, 0x52, 0x0b, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x50, 0x6c, 0x61, 0x6e, 0x42,
0x07, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x9f, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x73,
0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61,
0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x63, 0x6f, 0x6c,
0x75, 0x6d, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52,
0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x77, 0x5f,
0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x6f, 0x77,
0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f,
0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x72, 0x65,
0x67, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x24, 0x0a, 0x0c, 0x41, 0x66,
0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x22, 0x50, 0x0a, 0x0e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x12, 0x3e, 0x0a, 0x0d, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x72,
0x6f, 0x77, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64,
0x52, 0x6f, 0x77, 0x73, 0x52, 0x0c, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x6f,
0x77, 0x73, 0x42, 0x51, 0x0a, 0x0e, 0x69, 0x6f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x42, 0x08, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x5a, 0x35,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_database_proto_rawDescOnce sync.Once
file_greptime_v1_database_proto_rawDescData = file_greptime_v1_database_proto_rawDesc
)
func file_greptime_v1_database_proto_rawDescGZIP() []byte {
file_greptime_v1_database_proto_rawDescOnce.Do(func() {
file_greptime_v1_database_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_database_proto_rawDescData)
})
return file_greptime_v1_database_proto_rawDescData
}
var file_greptime_v1_database_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_greptime_v1_database_proto_goTypes = []interface{}{
(*RequestHeader)(nil), // 0: greptime.v1.RequestHeader
(*GreptimeRequest)(nil), // 1: greptime.v1.GreptimeRequest
(*QueryRequest)(nil), // 2: greptime.v1.QueryRequest
(*InsertRequest)(nil), // 3: greptime.v1.InsertRequest
(*AffectedRows)(nil), // 4: greptime.v1.AffectedRows
(*FlightMetadata)(nil), // 5: greptime.v1.FlightMetadata
(*DdlRequest)(nil), // 6: greptime.v1.DdlRequest
(*Column)(nil), // 7: greptime.v1.Column
}
var file_greptime_v1_database_proto_depIdxs = []int32{
0, // 0: greptime.v1.GreptimeRequest.header:type_name -> greptime.v1.RequestHeader
3, // 1: greptime.v1.GreptimeRequest.insert:type_name -> greptime.v1.InsertRequest
2, // 2: greptime.v1.GreptimeRequest.query:type_name -> greptime.v1.QueryRequest
6, // 3: greptime.v1.GreptimeRequest.ddl:type_name -> greptime.v1.DdlRequest
7, // 4: greptime.v1.InsertRequest.columns:type_name -> greptime.v1.Column
4, // 5: greptime.v1.FlightMetadata.affected_rows:type_name -> greptime.v1.AffectedRows
6, // [6:6] is the sub-list for method output_type
6, // [6:6] is the sub-list for method input_type
6, // [6:6] is the sub-list for extension type_name
6, // [6:6] is the sub-list for extension extendee
0, // [0:6] is the sub-list for field type_name
}
func init() { file_greptime_v1_database_proto_init() }
func file_greptime_v1_database_proto_init() {
if File_greptime_v1_database_proto != nil {
return
}
file_greptime_v1_ddl_proto_init()
file_greptime_v1_column_proto_init()
if !protoimpl.UnsafeEnabled {
file_greptime_v1_database_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_database_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GreptimeRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_database_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_database_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*InsertRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_database_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AffectedRows); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_database_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*FlightMetadata); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
file_greptime_v1_database_proto_msgTypes[1].OneofWrappers = []interface{}{
(*GreptimeRequest_Insert)(nil),
(*GreptimeRequest_Query)(nil),
(*GreptimeRequest_Ddl)(nil),
}
file_greptime_v1_database_proto_msgTypes[2].OneofWrappers = []interface{}{
(*QueryRequest_Sql)(nil),
(*QueryRequest_LogicalPlan)(nil),
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_database_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_greptime_v1_database_proto_goTypes,
DependencyIndexes: file_greptime_v1_database_proto_depIdxs,
MessageInfos: file_greptime_v1_database_proto_msgTypes,
}.Build()
File_greptime_v1_database_proto = out.File
file_greptime_v1_database_proto_rawDesc = nil
file_greptime_v1_database_proto_goTypes = nil
file_greptime_v1_database_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
+262
View File
@@ -0,0 +1,262 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/meta/cluster.proto
package meta
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type BatchGetRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Keys [][]byte `protobuf:"bytes,2,rep,name=keys,proto3" json:"keys,omitempty"`
}
func (x *BatchGetRequest) Reset() {
*x = BatchGetRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_cluster_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchGetRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchGetRequest) ProtoMessage() {}
func (x *BatchGetRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_cluster_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchGetRequest.ProtoReflect.Descriptor instead.
func (*BatchGetRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_cluster_proto_rawDescGZIP(), []int{0}
}
func (x *BatchGetRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *BatchGetRequest) GetKeys() [][]byte {
if x != nil {
return x.Keys
}
return nil
}
type BatchGetResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Kvs []*KeyValue `protobuf:"bytes,2,rep,name=kvs,proto3" json:"kvs,omitempty"`
}
func (x *BatchGetResponse) Reset() {
*x = BatchGetResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_cluster_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *BatchGetResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*BatchGetResponse) ProtoMessage() {}
func (x *BatchGetResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_cluster_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use BatchGetResponse.ProtoReflect.Descriptor instead.
func (*BatchGetResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_cluster_proto_rawDescGZIP(), []int{1}
}
func (x *BatchGetResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *BatchGetResponse) GetKvs() []*KeyValue {
if x != nil {
return x.Kvs
}
return nil
}
var File_greptime_v1_meta_cluster_proto protoreflect.FileDescriptor
var file_greptime_v1_meta_cluster_proto_rawDesc = []byte{
0x0a, 0x1e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x1a, 0x1c, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d,
0x65, 0x74, 0x61, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x5e, 0x0a, 0x0f, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61,
0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6b,
0x65, 0x79, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x22,
0x7a, 0x0a, 0x10, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48,
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a,
0x03, 0x6b, 0x76, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4b, 0x65,
0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x03, 0x6b, 0x76, 0x73, 0x32, 0xa6, 0x01, 0x0a, 0x07,
0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x51, 0x0a, 0x08, 0x42, 0x61, 0x74, 0x63, 0x68,
0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x52,
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47,
0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x52, 0x61,
0x6e, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f,
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_meta_cluster_proto_rawDescOnce sync.Once
file_greptime_v1_meta_cluster_proto_rawDescData = file_greptime_v1_meta_cluster_proto_rawDesc
)
func file_greptime_v1_meta_cluster_proto_rawDescGZIP() []byte {
file_greptime_v1_meta_cluster_proto_rawDescOnce.Do(func() {
file_greptime_v1_meta_cluster_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_cluster_proto_rawDescData)
})
return file_greptime_v1_meta_cluster_proto_rawDescData
}
var file_greptime_v1_meta_cluster_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_greptime_v1_meta_cluster_proto_goTypes = []interface{}{
(*BatchGetRequest)(nil), // 0: greptime.v1.meta.BatchGetRequest
(*BatchGetResponse)(nil), // 1: greptime.v1.meta.BatchGetResponse
(*RequestHeader)(nil), // 2: greptime.v1.meta.RequestHeader
(*ResponseHeader)(nil), // 3: greptime.v1.meta.ResponseHeader
(*KeyValue)(nil), // 4: greptime.v1.meta.KeyValue
(*RangeRequest)(nil), // 5: greptime.v1.meta.RangeRequest
(*RangeResponse)(nil), // 6: greptime.v1.meta.RangeResponse
}
var file_greptime_v1_meta_cluster_proto_depIdxs = []int32{
2, // 0: greptime.v1.meta.BatchGetRequest.header:type_name -> greptime.v1.meta.RequestHeader
3, // 1: greptime.v1.meta.BatchGetResponse.header:type_name -> greptime.v1.meta.ResponseHeader
4, // 2: greptime.v1.meta.BatchGetResponse.kvs:type_name -> greptime.v1.meta.KeyValue
0, // 3: greptime.v1.meta.Cluster.BatchGet:input_type -> greptime.v1.meta.BatchGetRequest
5, // 4: greptime.v1.meta.Cluster.Range:input_type -> greptime.v1.meta.RangeRequest
1, // 5: greptime.v1.meta.Cluster.BatchGet:output_type -> greptime.v1.meta.BatchGetResponse
6, // 6: greptime.v1.meta.Cluster.Range:output_type -> greptime.v1.meta.RangeResponse
5, // [5:7] is the sub-list for method output_type
3, // [3:5] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_greptime_v1_meta_cluster_proto_init() }
func file_greptime_v1_meta_cluster_proto_init() {
if File_greptime_v1_meta_cluster_proto != nil {
return
}
file_greptime_v1_meta_common_proto_init()
file_greptime_v1_meta_store_proto_init()
if !protoimpl.UnsafeEnabled {
file_greptime_v1_meta_cluster_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchGetRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_cluster_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*BatchGetResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_meta_cluster_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_greptime_v1_meta_cluster_proto_goTypes,
DependencyIndexes: file_greptime_v1_meta_cluster_proto_depIdxs,
MessageInfos: file_greptime_v1_meta_cluster_proto_msgTypes,
}.Build()
File_greptime_v1_meta_cluster_proto = out.File
file_greptime_v1_meta_cluster_proto_rawDesc = nil
file_greptime_v1_meta_cluster_proto_goTypes = nil
file_greptime_v1_meta_cluster_proto_depIdxs = nil
}
+145
View File
@@ -0,0 +1,145 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/meta/cluster.proto
package meta
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// ClusterClient is the client API for Cluster service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ClusterClient interface {
// Batch get kvs by input keys from leader's in_memory kv store.
BatchGet(ctx context.Context, in *BatchGetRequest, opts ...grpc.CallOption) (*BatchGetResponse, error)
// Range get the kvs from leader's in_memory kv store.
Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error)
}
type clusterClient struct {
cc grpc.ClientConnInterface
}
func NewClusterClient(cc grpc.ClientConnInterface) ClusterClient {
return &clusterClient{cc}
}
func (c *clusterClient) BatchGet(ctx context.Context, in *BatchGetRequest, opts ...grpc.CallOption) (*BatchGetResponse, error) {
out := new(BatchGetResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Cluster/BatchGet", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clusterClient) Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) {
out := new(RangeResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Cluster/Range", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ClusterServer is the server API for Cluster service.
// All implementations must embed UnimplementedClusterServer
// for forward compatibility
type ClusterServer interface {
// Batch get kvs by input keys from leader's in_memory kv store.
BatchGet(context.Context, *BatchGetRequest) (*BatchGetResponse, error)
// Range get the kvs from leader's in_memory kv store.
Range(context.Context, *RangeRequest) (*RangeResponse, error)
mustEmbedUnimplementedClusterServer()
}
// UnimplementedClusterServer must be embedded to have forward compatible implementations.
type UnimplementedClusterServer struct {
}
func (UnimplementedClusterServer) BatchGet(context.Context, *BatchGetRequest) (*BatchGetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchGet not implemented")
}
func (UnimplementedClusterServer) Range(context.Context, *RangeRequest) (*RangeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Range not implemented")
}
func (UnimplementedClusterServer) mustEmbedUnimplementedClusterServer() {}
// UnsafeClusterServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ClusterServer will
// result in compilation errors.
type UnsafeClusterServer interface {
mustEmbedUnimplementedClusterServer()
}
func RegisterClusterServer(s grpc.ServiceRegistrar, srv ClusterServer) {
s.RegisterService(&Cluster_ServiceDesc, srv)
}
func _Cluster_BatchGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchGetRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClusterServer).BatchGet(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Cluster/BatchGet",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClusterServer).BatchGet(ctx, req.(*BatchGetRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Cluster_Range_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RangeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClusterServer).Range(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Cluster/Range",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClusterServer).Range(ctx, req.(*RangeRequest))
}
return interceptor(ctx, in, info, handler)
}
// Cluster_ServiceDesc is the grpc.ServiceDesc for Cluster service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Cluster_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.meta.Cluster",
HandlerType: (*ClusterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "BatchGet",
Handler: _Cluster_BatchGet_Handler,
},
{
MethodName: "Range",
Handler: _Cluster_Range_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/meta/cluster.proto",
}
+632
View File
@@ -0,0 +1,632 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/meta/common.proto
package meta
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type RequestHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProtocolVersion uint64 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
// cluster_id is the ID of the cluster which be sent to.
ClusterId uint64 `protobuf:"varint,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
// member_id is the ID of the sender server.
MemberId uint64 `protobuf:"varint,3,opt,name=member_id,json=memberId,proto3" json:"member_id,omitempty"`
}
func (x *RequestHeader) Reset() {
*x = RequestHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_common_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RequestHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RequestHeader) ProtoMessage() {}
func (x *RequestHeader) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_common_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RequestHeader.ProtoReflect.Descriptor instead.
func (*RequestHeader) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{0}
}
func (x *RequestHeader) GetProtocolVersion() uint64 {
if x != nil {
return x.ProtocolVersion
}
return 0
}
func (x *RequestHeader) GetClusterId() uint64 {
if x != nil {
return x.ClusterId
}
return 0
}
func (x *RequestHeader) GetMemberId() uint64 {
if x != nil {
return x.MemberId
}
return 0
}
type ResponseHeader struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ProtocolVersion uint64 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
// cluster_id is the ID of the cluster which sent the response.
ClusterId uint64 `protobuf:"varint,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
Error *Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
}
func (x *ResponseHeader) Reset() {
*x = ResponseHeader{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_common_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ResponseHeader) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ResponseHeader) ProtoMessage() {}
func (x *ResponseHeader) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_common_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ResponseHeader.ProtoReflect.Descriptor instead.
func (*ResponseHeader) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{1}
}
func (x *ResponseHeader) GetProtocolVersion() uint64 {
if x != nil {
return x.ProtocolVersion
}
return 0
}
func (x *ResponseHeader) GetClusterId() uint64 {
if x != nil {
return x.ClusterId
}
return 0
}
func (x *ResponseHeader) GetError() *Error {
if x != nil {
return x.Error
}
return nil
}
type Error struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
}
func (x *Error) Reset() {
*x = Error{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_common_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Error) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Error) ProtoMessage() {}
func (x *Error) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_common_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Error.ProtoReflect.Descriptor instead.
func (*Error) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{2}
}
func (x *Error) GetCode() int32 {
if x != nil {
return x.Code
}
return 0
}
func (x *Error) GetErrMsg() string {
if x != nil {
return x.ErrMsg
}
return ""
}
type Peer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
}
func (x *Peer) Reset() {
*x = Peer{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_common_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Peer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Peer) ProtoMessage() {}
func (x *Peer) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_common_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Peer.ProtoReflect.Descriptor instead.
func (*Peer) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{3}
}
func (x *Peer) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Peer) GetAddr() string {
if x != nil {
return x.Addr
}
return ""
}
type TableName struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CatalogName string `protobuf:"bytes,1,opt,name=catalog_name,json=catalogName,proto3" json:"catalog_name,omitempty"`
SchemaName string `protobuf:"bytes,2,opt,name=schema_name,json=schemaName,proto3" json:"schema_name,omitempty"`
TableName string `protobuf:"bytes,3,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
}
func (x *TableName) Reset() {
*x = TableName{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_common_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TableName) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TableName) ProtoMessage() {}
func (x *TableName) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_common_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TableName.ProtoReflect.Descriptor instead.
func (*TableName) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{4}
}
func (x *TableName) GetCatalogName() string {
if x != nil {
return x.CatalogName
}
return ""
}
func (x *TableName) GetSchemaName() string {
if x != nil {
return x.SchemaName
}
return ""
}
func (x *TableName) GetTableName() string {
if x != nil {
return x.TableName
}
return ""
}
type TimeInterval struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The unix timestamp in millis of the start of this period.
StartTimestampMillis uint64 `protobuf:"varint,1,opt,name=start_timestamp_millis,json=startTimestampMillis,proto3" json:"start_timestamp_millis,omitempty"`
// The unix timestamp in millis of the end of this period.
EndTimestampMillis uint64 `protobuf:"varint,2,opt,name=end_timestamp_millis,json=endTimestampMillis,proto3" json:"end_timestamp_millis,omitempty"`
}
func (x *TimeInterval) Reset() {
*x = TimeInterval{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_common_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TimeInterval) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TimeInterval) ProtoMessage() {}
func (x *TimeInterval) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_common_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TimeInterval.ProtoReflect.Descriptor instead.
func (*TimeInterval) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{5}
}
func (x *TimeInterval) GetStartTimestampMillis() uint64 {
if x != nil {
return x.StartTimestampMillis
}
return 0
}
func (x *TimeInterval) GetEndTimestampMillis() uint64 {
if x != nil {
return x.EndTimestampMillis
}
return 0
}
type KeyValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// key is the key in bytes. An empty key is not allowed.
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// value is the value held by the key, in bytes.
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}
func (x *KeyValue) Reset() {
*x = KeyValue{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_common_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyValue) ProtoMessage() {}
func (x *KeyValue) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_common_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyValue.ProtoReflect.Descriptor instead.
func (*KeyValue) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_common_proto_rawDescGZIP(), []int{6}
}
func (x *KeyValue) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
func (x *KeyValue) GetValue() []byte {
if x != nil {
return x.Value
}
return nil
}
var File_greptime_v1_meta_common_proto protoreflect.FileDescriptor
var file_greptime_v1_meta_common_proto_rawDesc = []byte{
0x0a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x22, 0x76, 0x0a, 0x0d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a,
0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28,
0x04, 0x52, 0x09, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09,
0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52,
0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x49, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x0e, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x75, 0x73, 0x74,
0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x6c, 0x75,
0x73, 0x74, 0x65, 0x72, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18,
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05,
0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x34, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x12,
0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f,
0x64, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x65, 0x72, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x72, 0x72, 0x4d, 0x73, 0x67, 0x22, 0x2a, 0x0a, 0x04, 0x50,
0x65, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x64, 0x64, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
0x09, 0x52, 0x04, 0x61, 0x64, 0x64, 0x72, 0x22, 0x6e, 0x0a, 0x09, 0x54, 0x61, 0x62, 0x6c, 0x65,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x74, 0x61, 0x6c, 0x6f, 0x67, 0x5f,
0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x74, 0x61,
0x6c, 0x6f, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d,
0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c,
0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61,
0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x76, 0x0a, 0x0c, 0x54, 0x69, 0x6d, 0x65, 0x49,
0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x74, 0x61, 0x72, 0x74,
0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69,
0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69,
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x12, 0x30, 0x0a,
0x14, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d,
0x69, 0x6c, 0x6c, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x12, 0x65, 0x6e, 0x64,
0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x22,
0x32, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b,
0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a,
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74,
0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_meta_common_proto_rawDescOnce sync.Once
file_greptime_v1_meta_common_proto_rawDescData = file_greptime_v1_meta_common_proto_rawDesc
)
func file_greptime_v1_meta_common_proto_rawDescGZIP() []byte {
file_greptime_v1_meta_common_proto_rawDescOnce.Do(func() {
file_greptime_v1_meta_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_common_proto_rawDescData)
})
return file_greptime_v1_meta_common_proto_rawDescData
}
var file_greptime_v1_meta_common_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
var file_greptime_v1_meta_common_proto_goTypes = []interface{}{
(*RequestHeader)(nil), // 0: greptime.v1.meta.RequestHeader
(*ResponseHeader)(nil), // 1: greptime.v1.meta.ResponseHeader
(*Error)(nil), // 2: greptime.v1.meta.Error
(*Peer)(nil), // 3: greptime.v1.meta.Peer
(*TableName)(nil), // 4: greptime.v1.meta.TableName
(*TimeInterval)(nil), // 5: greptime.v1.meta.TimeInterval
(*KeyValue)(nil), // 6: greptime.v1.meta.KeyValue
}
var file_greptime_v1_meta_common_proto_depIdxs = []int32{
2, // 0: greptime.v1.meta.ResponseHeader.error:type_name -> greptime.v1.meta.Error
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_greptime_v1_meta_common_proto_init() }
func file_greptime_v1_meta_common_proto_init() {
if File_greptime_v1_meta_common_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_greptime_v1_meta_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RequestHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ResponseHeader); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Error); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Peer); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TableName); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_common_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TimeInterval); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_common_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_meta_common_proto_rawDesc,
NumEnums: 0,
NumMessages: 7,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_greptime_v1_meta_common_proto_goTypes,
DependencyIndexes: file_greptime_v1_meta_common_proto_depIdxs,
MessageInfos: file_greptime_v1_meta_common_proto_msgTypes,
}.Build()
File_greptime_v1_meta_common_proto = out.File
file_greptime_v1_meta_common_proto_rawDesc = nil
file_greptime_v1_meta_common_proto_goTypes = nil
file_greptime_v1_meta_common_proto_depIdxs = nil
}
+851
View File
@@ -0,0 +1,851 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/meta/heartbeat.proto
package meta
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type HeartbeatRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// Self peer
Peer *Peer `protobuf:"bytes,2,opt,name=peer,proto3" json:"peer,omitempty"`
// Leader node
IsLeader bool `protobuf:"varint,3,opt,name=is_leader,json=isLeader,proto3" json:"is_leader,omitempty"`
// Actually reported time interval
ReportInterval *TimeInterval `protobuf:"bytes,4,opt,name=report_interval,json=reportInterval,proto3" json:"report_interval,omitempty"`
// Node stat
NodeStat *NodeStat `protobuf:"bytes,5,opt,name=node_stat,json=nodeStat,proto3" json:"node_stat,omitempty"`
// Region stats on this node
RegionStats []*RegionStat `protobuf:"bytes,6,rep,name=region_stats,json=regionStats,proto3" json:"region_stats,omitempty"`
// Follower nodes and stats, empty on follower nodes
ReplicaStats []*ReplicaStat `protobuf:"bytes,7,rep,name=replica_stats,json=replicaStats,proto3" json:"replica_stats,omitempty"`
}
func (x *HeartbeatRequest) Reset() {
*x = HeartbeatRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeartbeatRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeartbeatRequest) ProtoMessage() {}
func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.
func (*HeartbeatRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{0}
}
func (x *HeartbeatRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *HeartbeatRequest) GetPeer() *Peer {
if x != nil {
return x.Peer
}
return nil
}
func (x *HeartbeatRequest) GetIsLeader() bool {
if x != nil {
return x.IsLeader
}
return false
}
func (x *HeartbeatRequest) GetReportInterval() *TimeInterval {
if x != nil {
return x.ReportInterval
}
return nil
}
func (x *HeartbeatRequest) GetNodeStat() *NodeStat {
if x != nil {
return x.NodeStat
}
return nil
}
func (x *HeartbeatRequest) GetRegionStats() []*RegionStat {
if x != nil {
return x.RegionStats
}
return nil
}
func (x *HeartbeatRequest) GetReplicaStats() []*ReplicaStat {
if x != nil {
return x.ReplicaStats
}
return nil
}
type NodeStat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The read capacity units during this period
Rcus int64 `protobuf:"varint,1,opt,name=rcus,proto3" json:"rcus,omitempty"`
// The write capacity units during this period
Wcus int64 `protobuf:"varint,2,opt,name=wcus,proto3" json:"wcus,omitempty"`
// How many tables on this node
TableNum int64 `protobuf:"varint,3,opt,name=table_num,json=tableNum,proto3" json:"table_num,omitempty"`
// How many regions on this node
RegionNum int64 `protobuf:"varint,4,opt,name=region_num,json=regionNum,proto3" json:"region_num,omitempty"`
CpuUsage float64 `protobuf:"fixed64,5,opt,name=cpu_usage,json=cpuUsage,proto3" json:"cpu_usage,omitempty"`
Load float64 `protobuf:"fixed64,6,opt,name=load,proto3" json:"load,omitempty"`
// Read disk IO on this node
ReadIoRate float64 `protobuf:"fixed64,7,opt,name=read_io_rate,json=readIoRate,proto3" json:"read_io_rate,omitempty"`
// Write disk IO on this node
WriteIoRate float64 `protobuf:"fixed64,8,opt,name=write_io_rate,json=writeIoRate,proto3" json:"write_io_rate,omitempty"`
// Others
Attrs map[string]string `protobuf:"bytes,100,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *NodeStat) Reset() {
*x = NodeStat{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *NodeStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*NodeStat) ProtoMessage() {}
func (x *NodeStat) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use NodeStat.ProtoReflect.Descriptor instead.
func (*NodeStat) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{1}
}
func (x *NodeStat) GetRcus() int64 {
if x != nil {
return x.Rcus
}
return 0
}
func (x *NodeStat) GetWcus() int64 {
if x != nil {
return x.Wcus
}
return 0
}
func (x *NodeStat) GetTableNum() int64 {
if x != nil {
return x.TableNum
}
return 0
}
func (x *NodeStat) GetRegionNum() int64 {
if x != nil {
return x.RegionNum
}
return 0
}
func (x *NodeStat) GetCpuUsage() float64 {
if x != nil {
return x.CpuUsage
}
return 0
}
func (x *NodeStat) GetLoad() float64 {
if x != nil {
return x.Load
}
return 0
}
func (x *NodeStat) GetReadIoRate() float64 {
if x != nil {
return x.ReadIoRate
}
return 0
}
func (x *NodeStat) GetWriteIoRate() float64 {
if x != nil {
return x.WriteIoRate
}
return 0
}
func (x *NodeStat) GetAttrs() map[string]string {
if x != nil {
return x.Attrs
}
return nil
}
type RegionStat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
RegionId uint64 `protobuf:"varint,1,opt,name=region_id,json=regionId,proto3" json:"region_id,omitempty"`
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
// The read capacity units during this period
Rcus int64 `protobuf:"varint,3,opt,name=rcus,proto3" json:"rcus,omitempty"`
// The write capacity units during this period
Wcus int64 `protobuf:"varint,4,opt,name=wcus,proto3" json:"wcus,omitempty"`
// Approximate bytes of this region
ApproximateBytes int64 `protobuf:"varint,5,opt,name=approximate_bytes,json=approximateBytes,proto3" json:"approximate_bytes,omitempty"`
// Approximate number of rows in this region
ApproximateRows int64 `protobuf:"varint,6,opt,name=approximate_rows,json=approximateRows,proto3" json:"approximate_rows,omitempty"`
// Others
Attrs map[string]string `protobuf:"bytes,100,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *RegionStat) Reset() {
*x = RegionStat{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegionStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegionStat) ProtoMessage() {}
func (x *RegionStat) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RegionStat.ProtoReflect.Descriptor instead.
func (*RegionStat) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{2}
}
func (x *RegionStat) GetRegionId() uint64 {
if x != nil {
return x.RegionId
}
return 0
}
func (x *RegionStat) GetTableName() *TableName {
if x != nil {
return x.TableName
}
return nil
}
func (x *RegionStat) GetRcus() int64 {
if x != nil {
return x.Rcus
}
return 0
}
func (x *RegionStat) GetWcus() int64 {
if x != nil {
return x.Wcus
}
return 0
}
func (x *RegionStat) GetApproximateBytes() int64 {
if x != nil {
return x.ApproximateBytes
}
return 0
}
func (x *RegionStat) GetApproximateRows() int64 {
if x != nil {
return x.ApproximateRows
}
return 0
}
func (x *RegionStat) GetAttrs() map[string]string {
if x != nil {
return x.Attrs
}
return nil
}
type ReplicaStat struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Peer *Peer `protobuf:"bytes,1,opt,name=peer,proto3" json:"peer,omitempty"`
InSync bool `protobuf:"varint,2,opt,name=in_sync,json=inSync,proto3" json:"in_sync,omitempty"`
IsLearner bool `protobuf:"varint,3,opt,name=is_learner,json=isLearner,proto3" json:"is_learner,omitempty"`
}
func (x *ReplicaStat) Reset() {
*x = ReplicaStat{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReplicaStat) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReplicaStat) ProtoMessage() {}
func (x *ReplicaStat) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReplicaStat.ProtoReflect.Descriptor instead.
func (*ReplicaStat) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{3}
}
func (x *ReplicaStat) GetPeer() *Peer {
if x != nil {
return x.Peer
}
return nil
}
func (x *ReplicaStat) GetInSync() bool {
if x != nil {
return x.InSync
}
return false
}
func (x *ReplicaStat) GetIsLearner() bool {
if x != nil {
return x.IsLearner
}
return false
}
type HeartbeatResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Payload [][]byte `protobuf:"bytes,2,rep,name=payload,proto3" json:"payload,omitempty"`
}
func (x *HeartbeatResponse) Reset() {
*x = HeartbeatResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *HeartbeatResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*HeartbeatResponse) ProtoMessage() {}
func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.
func (*HeartbeatResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{4}
}
func (x *HeartbeatResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *HeartbeatResponse) GetPayload() [][]byte {
if x != nil {
return x.Payload
}
return nil
}
type AskLeaderRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
func (x *AskLeaderRequest) Reset() {
*x = AskLeaderRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AskLeaderRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AskLeaderRequest) ProtoMessage() {}
func (x *AskLeaderRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AskLeaderRequest.ProtoReflect.Descriptor instead.
func (*AskLeaderRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{5}
}
func (x *AskLeaderRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
type AskLeaderResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Leader *Peer `protobuf:"bytes,2,opt,name=leader,proto3" json:"leader,omitempty"`
}
func (x *AskLeaderResponse) Reset() {
*x = AskLeaderResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AskLeaderResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AskLeaderResponse) ProtoMessage() {}
func (x *AskLeaderResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_heartbeat_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AskLeaderResponse.ProtoReflect.Descriptor instead.
func (*AskLeaderResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_heartbeat_proto_rawDescGZIP(), []int{6}
}
func (x *AskLeaderResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *AskLeaderResponse) GetLeader() *Peer {
if x != nil {
return x.Leader
}
return nil
}
var File_greptime_v1_meta_heartbeat_proto protoreflect.FileDescriptor
var file_greptime_v1_meta_heartbeat_proto_rawDesc = []byte{
0x0a, 0x20, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x12, 0x10, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76,
0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0x9b, 0x03, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64,
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,
0x72, 0x12, 0x2a, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x1b, 0x0a,
0x09, 0x69, 0x73, 0x5f, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08,
0x52, 0x08, 0x69, 0x73, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0f, 0x72, 0x65,
0x70, 0x6f, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x04, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72,
0x76, 0x61, 0x6c, 0x12, 0x37, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x73, 0x74, 0x61, 0x74,
0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74,
0x61, 0x74, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x3f, 0x0a, 0x0c,
0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03,
0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
0x52, 0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x42, 0x0a,
0x0d, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x07,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53,
0x74, 0x61, 0x74, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x74, 0x61, 0x74,
0x73, 0x22, 0xdc, 0x02, 0x0a, 0x08, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x74, 0x61, 0x74, 0x12, 0x12,
0x0a, 0x04, 0x72, 0x63, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x63,
0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x77, 0x63, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x04, 0x77, 0x63, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f,
0x6e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x74, 0x61, 0x62, 0x6c, 0x65,
0x4e, 0x75, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x75,
0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x4e,
0x75, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x75, 0x73, 0x61, 0x67, 0x65, 0x18,
0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x63, 0x70, 0x75, 0x55, 0x73, 0x61, 0x67, 0x65, 0x12,
0x12, 0x0a, 0x04, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x04, 0x6c,
0x6f, 0x61, 0x64, 0x12, 0x20, 0x0a, 0x0c, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x69, 0x6f, 0x5f, 0x72,
0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x72, 0x65, 0x61, 0x64, 0x49,
0x6f, 0x52, 0x61, 0x74, 0x65, 0x12, 0x22, 0x0a, 0x0d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x69,
0x6f, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x77, 0x72,
0x69, 0x74, 0x65, 0x49, 0x6f, 0x52, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x61, 0x74, 0x74,
0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x4e, 0x6f, 0x64, 0x65,
0x53, 0x74, 0x61, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52,
0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45,
0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
0x22, 0xde, 0x02, 0x0a, 0x0a, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x12,
0x1b, 0x0a, 0x09, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
0x28, 0x04, 0x52, 0x08, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3a, 0x0a, 0x0a,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x63, 0x75, 0x73,
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x72, 0x63, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04,
0x77, 0x63, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x77, 0x63, 0x75, 0x73,
0x12, 0x2b, 0x0a, 0x11, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x5f,
0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x61, 0x70, 0x70,
0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a,
0x10, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x77,
0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69,
0x6d, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x77, 0x73, 0x12, 0x3d, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72,
0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f,
0x6e, 0x53, 0x74, 0x61, 0x74, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79,
0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38,
0x01, 0x22, 0x71, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x53, 0x74, 0x61, 0x74,
0x12, 0x2a, 0x0a, 0x04, 0x70, 0x65, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x04, 0x70, 0x65, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07,
0x69, 0x6e, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x69,
0x6e, 0x53, 0x79, 0x6e, 0x63, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x6c, 0x65, 0x61, 0x72,
0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x4c, 0x65, 0x61,
0x72, 0x6e, 0x65, 0x72, 0x22, 0x67, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61,
0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02,
0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x4b, 0x0a,
0x10, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0x7d, 0x0a, 0x11, 0x41, 0x73,
0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65,
0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2e, 0x0a, 0x06, 0x6c, 0x65, 0x61,
0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65,
0x72, 0x52, 0x06, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x32, 0xbf, 0x01, 0x0a, 0x09, 0x48, 0x65,
0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x5a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74,
0x62, 0x65, 0x61, 0x74, 0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x48, 0x65, 0x61, 0x72,
0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28,
0x01, 0x30, 0x01, 0x12, 0x56, 0x0a, 0x09, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72,
0x12, 0x22, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e,
0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x41, 0x73, 0x6b, 0x4c, 0x65, 0x61, 0x64, 0x65,
0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67,
0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69,
0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d,
0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
}
var (
file_greptime_v1_meta_heartbeat_proto_rawDescOnce sync.Once
file_greptime_v1_meta_heartbeat_proto_rawDescData = file_greptime_v1_meta_heartbeat_proto_rawDesc
)
func file_greptime_v1_meta_heartbeat_proto_rawDescGZIP() []byte {
file_greptime_v1_meta_heartbeat_proto_rawDescOnce.Do(func() {
file_greptime_v1_meta_heartbeat_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_heartbeat_proto_rawDescData)
})
return file_greptime_v1_meta_heartbeat_proto_rawDescData
}
var file_greptime_v1_meta_heartbeat_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_greptime_v1_meta_heartbeat_proto_goTypes = []interface{}{
(*HeartbeatRequest)(nil), // 0: greptime.v1.meta.HeartbeatRequest
(*NodeStat)(nil), // 1: greptime.v1.meta.NodeStat
(*RegionStat)(nil), // 2: greptime.v1.meta.RegionStat
(*ReplicaStat)(nil), // 3: greptime.v1.meta.ReplicaStat
(*HeartbeatResponse)(nil), // 4: greptime.v1.meta.HeartbeatResponse
(*AskLeaderRequest)(nil), // 5: greptime.v1.meta.AskLeaderRequest
(*AskLeaderResponse)(nil), // 6: greptime.v1.meta.AskLeaderResponse
nil, // 7: greptime.v1.meta.NodeStat.AttrsEntry
nil, // 8: greptime.v1.meta.RegionStat.AttrsEntry
(*RequestHeader)(nil), // 9: greptime.v1.meta.RequestHeader
(*Peer)(nil), // 10: greptime.v1.meta.Peer
(*TimeInterval)(nil), // 11: greptime.v1.meta.TimeInterval
(*TableName)(nil), // 12: greptime.v1.meta.TableName
(*ResponseHeader)(nil), // 13: greptime.v1.meta.ResponseHeader
}
var file_greptime_v1_meta_heartbeat_proto_depIdxs = []int32{
9, // 0: greptime.v1.meta.HeartbeatRequest.header:type_name -> greptime.v1.meta.RequestHeader
10, // 1: greptime.v1.meta.HeartbeatRequest.peer:type_name -> greptime.v1.meta.Peer
11, // 2: greptime.v1.meta.HeartbeatRequest.report_interval:type_name -> greptime.v1.meta.TimeInterval
1, // 3: greptime.v1.meta.HeartbeatRequest.node_stat:type_name -> greptime.v1.meta.NodeStat
2, // 4: greptime.v1.meta.HeartbeatRequest.region_stats:type_name -> greptime.v1.meta.RegionStat
3, // 5: greptime.v1.meta.HeartbeatRequest.replica_stats:type_name -> greptime.v1.meta.ReplicaStat
7, // 6: greptime.v1.meta.NodeStat.attrs:type_name -> greptime.v1.meta.NodeStat.AttrsEntry
12, // 7: greptime.v1.meta.RegionStat.table_name:type_name -> greptime.v1.meta.TableName
8, // 8: greptime.v1.meta.RegionStat.attrs:type_name -> greptime.v1.meta.RegionStat.AttrsEntry
10, // 9: greptime.v1.meta.ReplicaStat.peer:type_name -> greptime.v1.meta.Peer
13, // 10: greptime.v1.meta.HeartbeatResponse.header:type_name -> greptime.v1.meta.ResponseHeader
9, // 11: greptime.v1.meta.AskLeaderRequest.header:type_name -> greptime.v1.meta.RequestHeader
13, // 12: greptime.v1.meta.AskLeaderResponse.header:type_name -> greptime.v1.meta.ResponseHeader
10, // 13: greptime.v1.meta.AskLeaderResponse.leader:type_name -> greptime.v1.meta.Peer
0, // 14: greptime.v1.meta.Heartbeat.Heartbeat:input_type -> greptime.v1.meta.HeartbeatRequest
5, // 15: greptime.v1.meta.Heartbeat.AskLeader:input_type -> greptime.v1.meta.AskLeaderRequest
4, // 16: greptime.v1.meta.Heartbeat.Heartbeat:output_type -> greptime.v1.meta.HeartbeatResponse
6, // 17: greptime.v1.meta.Heartbeat.AskLeader:output_type -> greptime.v1.meta.AskLeaderResponse
16, // [16:18] is the sub-list for method output_type
14, // [14:16] is the sub-list for method input_type
14, // [14:14] is the sub-list for extension type_name
14, // [14:14] is the sub-list for extension extendee
0, // [0:14] is the sub-list for field type_name
}
func init() { file_greptime_v1_meta_heartbeat_proto_init() }
func file_greptime_v1_meta_heartbeat_proto_init() {
if File_greptime_v1_meta_heartbeat_proto != nil {
return
}
file_greptime_v1_meta_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_greptime_v1_meta_heartbeat_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeartbeatRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_heartbeat_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*NodeStat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_heartbeat_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegionStat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_heartbeat_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReplicaStat); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_heartbeat_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*HeartbeatResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_heartbeat_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AskLeaderRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_heartbeat_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AskLeaderResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_meta_heartbeat_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_greptime_v1_meta_heartbeat_proto_goTypes,
DependencyIndexes: file_greptime_v1_meta_heartbeat_proto_depIdxs,
MessageInfos: file_greptime_v1_meta_heartbeat_proto_msgTypes,
}.Build()
File_greptime_v1_meta_heartbeat_proto = out.File
file_greptime_v1_meta_heartbeat_proto_rawDesc = nil
file_greptime_v1_meta_heartbeat_proto_goTypes = nil
file_greptime_v1_meta_heartbeat_proto_depIdxs = nil
}
+184
View File
@@ -0,0 +1,184 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/meta/heartbeat.proto
package meta
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// HeartbeatClient is the client API for Heartbeat service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type HeartbeatClient interface {
// Heartbeat, there may be many contents of the heartbeat, such as:
// 1. Metadata to be registered to meta server and discoverable by other nodes.
// 2. Some performance metrics, such as Load, CPU usage, etc.
// 3. The number of computing tasks being executed.
Heartbeat(ctx context.Context, opts ...grpc.CallOption) (Heartbeat_HeartbeatClient, error)
// Ask leader's endpoint.
AskLeader(ctx context.Context, in *AskLeaderRequest, opts ...grpc.CallOption) (*AskLeaderResponse, error)
}
type heartbeatClient struct {
cc grpc.ClientConnInterface
}
func NewHeartbeatClient(cc grpc.ClientConnInterface) HeartbeatClient {
return &heartbeatClient{cc}
}
func (c *heartbeatClient) Heartbeat(ctx context.Context, opts ...grpc.CallOption) (Heartbeat_HeartbeatClient, error) {
stream, err := c.cc.NewStream(ctx, &Heartbeat_ServiceDesc.Streams[0], "/greptime.v1.meta.Heartbeat/Heartbeat", opts...)
if err != nil {
return nil, err
}
x := &heartbeatHeartbeatClient{stream}
return x, nil
}
type Heartbeat_HeartbeatClient interface {
Send(*HeartbeatRequest) error
Recv() (*HeartbeatResponse, error)
grpc.ClientStream
}
type heartbeatHeartbeatClient struct {
grpc.ClientStream
}
func (x *heartbeatHeartbeatClient) Send(m *HeartbeatRequest) error {
return x.ClientStream.SendMsg(m)
}
func (x *heartbeatHeartbeatClient) Recv() (*HeartbeatResponse, error) {
m := new(HeartbeatResponse)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *heartbeatClient) AskLeader(ctx context.Context, in *AskLeaderRequest, opts ...grpc.CallOption) (*AskLeaderResponse, error) {
out := new(AskLeaderResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Heartbeat/AskLeader", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// HeartbeatServer is the server API for Heartbeat service.
// All implementations must embed UnimplementedHeartbeatServer
// for forward compatibility
type HeartbeatServer interface {
// Heartbeat, there may be many contents of the heartbeat, such as:
// 1. Metadata to be registered to meta server and discoverable by other nodes.
// 2. Some performance metrics, such as Load, CPU usage, etc.
// 3. The number of computing tasks being executed.
Heartbeat(Heartbeat_HeartbeatServer) error
// Ask leader's endpoint.
AskLeader(context.Context, *AskLeaderRequest) (*AskLeaderResponse, error)
mustEmbedUnimplementedHeartbeatServer()
}
// UnimplementedHeartbeatServer must be embedded to have forward compatible implementations.
type UnimplementedHeartbeatServer struct {
}
func (UnimplementedHeartbeatServer) Heartbeat(Heartbeat_HeartbeatServer) error {
return status.Errorf(codes.Unimplemented, "method Heartbeat not implemented")
}
func (UnimplementedHeartbeatServer) AskLeader(context.Context, *AskLeaderRequest) (*AskLeaderResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AskLeader not implemented")
}
func (UnimplementedHeartbeatServer) mustEmbedUnimplementedHeartbeatServer() {}
// UnsafeHeartbeatServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HeartbeatServer will
// result in compilation errors.
type UnsafeHeartbeatServer interface {
mustEmbedUnimplementedHeartbeatServer()
}
func RegisterHeartbeatServer(s grpc.ServiceRegistrar, srv HeartbeatServer) {
s.RegisterService(&Heartbeat_ServiceDesc, srv)
}
func _Heartbeat_Heartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(HeartbeatServer).Heartbeat(&heartbeatHeartbeatServer{stream})
}
type Heartbeat_HeartbeatServer interface {
Send(*HeartbeatResponse) error
Recv() (*HeartbeatRequest, error)
grpc.ServerStream
}
type heartbeatHeartbeatServer struct {
grpc.ServerStream
}
func (x *heartbeatHeartbeatServer) Send(m *HeartbeatResponse) error {
return x.ServerStream.SendMsg(m)
}
func (x *heartbeatHeartbeatServer) Recv() (*HeartbeatRequest, error) {
m := new(HeartbeatRequest)
if err := x.ServerStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func _Heartbeat_AskLeader_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AskLeaderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(HeartbeatServer).AskLeader(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Heartbeat/AskLeader",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(HeartbeatServer).AskLeader(ctx, req.(*AskLeaderRequest))
}
return interceptor(ctx, in, info, handler)
}
// Heartbeat_ServiceDesc is the grpc.ServiceDesc for Heartbeat service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Heartbeat_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.meta.Heartbeat",
HandlerType: (*HeartbeatServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "AskLeader",
Handler: _Heartbeat_AskLeader_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Heartbeat",
Handler: _Heartbeat_Heartbeat_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "greptime/v1/meta/heartbeat.proto",
}
+408
View File
@@ -0,0 +1,408 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/meta/lock.proto
package meta
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type LockRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// Name is the identifier for the distributed shared lock to be acquired.
Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// If the expiration time is exceeded and currently holds the lock, the lock is
// automatically released.
ExpireSecs int64 `protobuf:"varint,3,opt,name=expire_secs,json=expireSecs,proto3" json:"expire_secs,omitempty"`
}
func (x *LockRequest) Reset() {
*x = LockRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LockRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LockRequest) ProtoMessage() {}
func (x *LockRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LockRequest.ProtoReflect.Descriptor instead.
func (*LockRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{0}
}
func (x *LockRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *LockRequest) GetName() []byte {
if x != nil {
return x.Name
}
return nil
}
func (x *LockRequest) GetExpireSecs() int64 {
if x != nil {
return x.ExpireSecs
}
return 0
}
type LockResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// Key will exist as long as lock is held by the caller.
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}
func (x *LockResponse) Reset() {
*x = LockResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *LockResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*LockResponse) ProtoMessage() {}
func (x *LockResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use LockResponse.ProtoReflect.Descriptor instead.
func (*LockResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{1}
}
func (x *LockResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *LockResponse) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
type UnlockRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
// key is the lock ownership key granted by Lock.
Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
}
func (x *UnlockRequest) Reset() {
*x = UnlockRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UnlockRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UnlockRequest) ProtoMessage() {}
func (x *UnlockRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UnlockRequest.ProtoReflect.Descriptor instead.
func (*UnlockRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{2}
}
func (x *UnlockRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *UnlockRequest) GetKey() []byte {
if x != nil {
return x.Key
}
return nil
}
type UnlockResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
}
func (x *UnlockResponse) Reset() {
*x = UnlockResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UnlockResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UnlockResponse) ProtoMessage() {}
func (x *UnlockResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_lock_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UnlockResponse.ProtoReflect.Descriptor instead.
func (*UnlockResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_lock_proto_rawDescGZIP(), []int{3}
}
func (x *UnlockResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
var File_greptime_v1_meta_lock_proto protoreflect.FileDescriptor
var file_greptime_v1_meta_lock_proto_rawDesc = []byte{
0x0a, 0x1b, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x1a,
0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74,
0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x7b,
0x0a, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a,
0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e,
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06,
0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x78,
0x70, 0x69, 0x72, 0x65, 0x5f, 0x73, 0x65, 0x63, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52,
0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x53, 0x65, 0x63, 0x73, 0x22, 0x5a, 0x0a, 0x0c, 0x4c,
0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68,
0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72,
0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68,
0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x5a, 0x0a, 0x0d, 0x55, 0x6e, 0x6c, 0x6f, 0x63,
0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64,
0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65,
0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03,
0x6b, 0x65, 0x79, 0x22, 0x4a, 0x0a, 0x0e, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73,
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x32,
0x9a, 0x01, 0x0a, 0x04, 0x4c, 0x6f, 0x63, 0x6b, 0x12, 0x45, 0x0a, 0x04, 0x4c, 0x6f, 0x63, 0x6b,
0x12, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65,
0x74, 0x61, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x4b, 0x0a, 0x06, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x55, 0x6e, 0x6c,
0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x55, 0x6e,
0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3c, 0x5a, 0x3a,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69,
0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x33,
}
var (
file_greptime_v1_meta_lock_proto_rawDescOnce sync.Once
file_greptime_v1_meta_lock_proto_rawDescData = file_greptime_v1_meta_lock_proto_rawDesc
)
func file_greptime_v1_meta_lock_proto_rawDescGZIP() []byte {
file_greptime_v1_meta_lock_proto_rawDescOnce.Do(func() {
file_greptime_v1_meta_lock_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_lock_proto_rawDescData)
})
return file_greptime_v1_meta_lock_proto_rawDescData
}
var file_greptime_v1_meta_lock_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_greptime_v1_meta_lock_proto_goTypes = []interface{}{
(*LockRequest)(nil), // 0: greptime.v1.meta.LockRequest
(*LockResponse)(nil), // 1: greptime.v1.meta.LockResponse
(*UnlockRequest)(nil), // 2: greptime.v1.meta.UnlockRequest
(*UnlockResponse)(nil), // 3: greptime.v1.meta.UnlockResponse
(*RequestHeader)(nil), // 4: greptime.v1.meta.RequestHeader
(*ResponseHeader)(nil), // 5: greptime.v1.meta.ResponseHeader
}
var file_greptime_v1_meta_lock_proto_depIdxs = []int32{
4, // 0: greptime.v1.meta.LockRequest.header:type_name -> greptime.v1.meta.RequestHeader
5, // 1: greptime.v1.meta.LockResponse.header:type_name -> greptime.v1.meta.ResponseHeader
4, // 2: greptime.v1.meta.UnlockRequest.header:type_name -> greptime.v1.meta.RequestHeader
5, // 3: greptime.v1.meta.UnlockResponse.header:type_name -> greptime.v1.meta.ResponseHeader
0, // 4: greptime.v1.meta.Lock.Lock:input_type -> greptime.v1.meta.LockRequest
2, // 5: greptime.v1.meta.Lock.Unlock:input_type -> greptime.v1.meta.UnlockRequest
1, // 6: greptime.v1.meta.Lock.Lock:output_type -> greptime.v1.meta.LockResponse
3, // 7: greptime.v1.meta.Lock.Unlock:output_type -> greptime.v1.meta.UnlockResponse
6, // [6:8] is the sub-list for method output_type
4, // [4:6] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_greptime_v1_meta_lock_proto_init() }
func file_greptime_v1_meta_lock_proto_init() {
if File_greptime_v1_meta_lock_proto != nil {
return
}
file_greptime_v1_meta_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_greptime_v1_meta_lock_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LockRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_lock_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*LockResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_lock_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnlockRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_lock_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UnlockResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_meta_lock_proto_rawDesc,
NumEnums: 0,
NumMessages: 4,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_greptime_v1_meta_lock_proto_goTypes,
DependencyIndexes: file_greptime_v1_meta_lock_proto_depIdxs,
MessageInfos: file_greptime_v1_meta_lock_proto_msgTypes,
}.Build()
File_greptime_v1_meta_lock_proto = out.File
file_greptime_v1_meta_lock_proto_rawDesc = nil
file_greptime_v1_meta_lock_proto_goTypes = nil
file_greptime_v1_meta_lock_proto_depIdxs = nil
}
+147
View File
@@ -0,0 +1,147 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/meta/lock.proto
package meta
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// LockClient is the client API for Lock service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type LockClient interface {
// Lock acquires a distributed shared lock on a given named lock. On success, it
// will return a unique key that exists so long as the lock is held by the caller.
Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error)
// Unlock takes a key returned by Lock and releases the hold on lock.
Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
}
type lockClient struct {
cc grpc.ClientConnInterface
}
func NewLockClient(cc grpc.ClientConnInterface) LockClient {
return &lockClient{cc}
}
func (c *lockClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) {
out := new(LockResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Lock/Lock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *lockClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
out := new(UnlockResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Lock/Unlock", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LockServer is the server API for Lock service.
// All implementations must embed UnimplementedLockServer
// for forward compatibility
type LockServer interface {
// Lock acquires a distributed shared lock on a given named lock. On success, it
// will return a unique key that exists so long as the lock is held by the caller.
Lock(context.Context, *LockRequest) (*LockResponse, error)
// Unlock takes a key returned by Lock and releases the hold on lock.
Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
mustEmbedUnimplementedLockServer()
}
// UnimplementedLockServer must be embedded to have forward compatible implementations.
type UnimplementedLockServer struct {
}
func (UnimplementedLockServer) Lock(context.Context, *LockRequest) (*LockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented")
}
func (UnimplementedLockServer) Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented")
}
func (UnimplementedLockServer) mustEmbedUnimplementedLockServer() {}
// UnsafeLockServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to LockServer will
// result in compilation errors.
type UnsafeLockServer interface {
mustEmbedUnimplementedLockServer()
}
func RegisterLockServer(s grpc.ServiceRegistrar, srv LockServer) {
s.RegisterService(&Lock_ServiceDesc, srv)
}
func _Lock_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LockServer).Lock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Lock/Lock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LockServer).Lock(ctx, req.(*LockRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Lock_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UnlockRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LockServer).Unlock(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Lock/Unlock",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LockServer).Unlock(ctx, req.(*UnlockRequest))
}
return interceptor(ctx, in, info, handler)
}
// Lock_ServiceDesc is the grpc.ServiceDesc for Lock service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Lock_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.meta.Lock",
HandlerType: (*LockServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Lock",
Handler: _Lock_Lock_Handler,
},
{
MethodName: "Unlock",
Handler: _Lock_Unlock_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/meta/lock.proto",
}
+967
View File
@@ -0,0 +1,967 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: greptime/v1/meta/route.proto
package meta
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type CreateRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
Partitions []*Partition `protobuf:"bytes,3,rep,name=partitions,proto3" json:"partitions,omitempty"`
TableInfo []byte `protobuf:"bytes,4,opt,name=table_info,json=tableInfo,proto3" json:"table_info,omitempty"`
}
func (x *CreateRequest) Reset() {
*x = CreateRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *CreateRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*CreateRequest) ProtoMessage() {}
func (x *CreateRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{0}
}
func (x *CreateRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *CreateRequest) GetTableName() *TableName {
if x != nil {
return x.TableName
}
return nil
}
func (x *CreateRequest) GetPartitions() []*Partition {
if x != nil {
return x.Partitions
}
return nil
}
func (x *CreateRequest) GetTableInfo() []byte {
if x != nil {
return x.TableInfo
}
return nil
}
type RouteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
TableNames []*TableName `protobuf:"bytes,2,rep,name=table_names,json=tableNames,proto3" json:"table_names,omitempty"`
}
func (x *RouteRequest) Reset() {
*x = RouteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteRequest) ProtoMessage() {}
func (x *RouteRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RouteRequest.ProtoReflect.Descriptor instead.
func (*RouteRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{1}
}
func (x *RouteRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *RouteRequest) GetTableNames() []*TableName {
if x != nil {
return x.TableNames
}
return nil
}
type DeleteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
}
func (x *DeleteRequest) Reset() {
*x = DeleteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DeleteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DeleteRequest) ProtoMessage() {}
func (x *DeleteRequest) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{2}
}
func (x *DeleteRequest) GetHeader() *RequestHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *DeleteRequest) GetTableName() *TableName {
if x != nil {
return x.TableName
}
return nil
}
type RouteResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
Peers []*Peer `protobuf:"bytes,2,rep,name=peers,proto3" json:"peers,omitempty"`
TableRoutes []*TableRoute `protobuf:"bytes,3,rep,name=table_routes,json=tableRoutes,proto3" json:"table_routes,omitempty"`
}
func (x *RouteResponse) Reset() {
*x = RouteResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RouteResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RouteResponse) ProtoMessage() {}
func (x *RouteResponse) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RouteResponse.ProtoReflect.Descriptor instead.
func (*RouteResponse) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{3}
}
func (x *RouteResponse) GetHeader() *ResponseHeader {
if x != nil {
return x.Header
}
return nil
}
func (x *RouteResponse) GetPeers() []*Peer {
if x != nil {
return x.Peers
}
return nil
}
func (x *RouteResponse) GetTableRoutes() []*TableRoute {
if x != nil {
return x.TableRoutes
}
return nil
}
type TableRoute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Table *Table `protobuf:"bytes,1,opt,name=table,proto3" json:"table,omitempty"`
RegionRoutes []*RegionRoute `protobuf:"bytes,2,rep,name=region_routes,json=regionRoutes,proto3" json:"region_routes,omitempty"`
}
func (x *TableRoute) Reset() {
*x = TableRoute{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TableRoute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TableRoute) ProtoMessage() {}
func (x *TableRoute) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TableRoute.ProtoReflect.Descriptor instead.
func (*TableRoute) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{4}
}
func (x *TableRoute) GetTable() *Table {
if x != nil {
return x.Table
}
return nil
}
func (x *TableRoute) GetRegionRoutes() []*RegionRoute {
if x != nil {
return x.RegionRoutes
}
return nil
}
type RegionRoute struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Region *Region `protobuf:"bytes,1,opt,name=region,proto3" json:"region,omitempty"`
// single leader node for write task
LeaderPeerIndex uint64 `protobuf:"varint,2,opt,name=leader_peer_index,json=leaderPeerIndex,proto3" json:"leader_peer_index,omitempty"`
// multiple follower nodes for read task
FollowerPeerIndexes []uint64 `protobuf:"varint,3,rep,packed,name=follower_peer_indexes,json=followerPeerIndexes,proto3" json:"follower_peer_indexes,omitempty"`
}
func (x *RegionRoute) Reset() {
*x = RegionRoute{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *RegionRoute) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*RegionRoute) ProtoMessage() {}
func (x *RegionRoute) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use RegionRoute.ProtoReflect.Descriptor instead.
func (*RegionRoute) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{5}
}
func (x *RegionRoute) GetRegion() *Region {
if x != nil {
return x.Region
}
return nil
}
func (x *RegionRoute) GetLeaderPeerIndex() uint64 {
if x != nil {
return x.LeaderPeerIndex
}
return 0
}
func (x *RegionRoute) GetFollowerPeerIndexes() []uint64 {
if x != nil {
return x.FollowerPeerIndexes
}
return nil
}
type Table struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
TableName *TableName `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`
TableSchema []byte `protobuf:"bytes,3,opt,name=table_schema,json=tableSchema,proto3" json:"table_schema,omitempty"`
}
func (x *Table) Reset() {
*x = Table{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Table) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Table) ProtoMessage() {}
func (x *Table) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Table.ProtoReflect.Descriptor instead.
func (*Table) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{6}
}
func (x *Table) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Table) GetTableName() *TableName {
if x != nil {
return x.TableName
}
return nil
}
func (x *Table) GetTableSchema() []byte {
if x != nil {
return x.TableSchema
}
return nil
}
type Region struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// TODO(LFC): Maybe use message RegionNumber?
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Partition *Partition `protobuf:"bytes,3,opt,name=partition,proto3" json:"partition,omitempty"`
Attrs map[string]string `protobuf:"bytes,100,rep,name=attrs,proto3" json:"attrs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
func (x *Region) Reset() {
*x = Region{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Region) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Region) ProtoMessage() {}
func (x *Region) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Region.ProtoReflect.Descriptor instead.
func (*Region) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{7}
}
func (x *Region) GetId() uint64 {
if x != nil {
return x.Id
}
return 0
}
func (x *Region) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Region) GetPartition() *Partition {
if x != nil {
return x.Partition
}
return nil
}
func (x *Region) GetAttrs() map[string]string {
if x != nil {
return x.Attrs
}
return nil
}
// PARTITION `region_name` VALUES LESS THAN (value_list)
type Partition struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ColumnList [][]byte `protobuf:"bytes,1,rep,name=column_list,json=columnList,proto3" json:"column_list,omitempty"`
ValueList [][]byte `protobuf:"bytes,2,rep,name=value_list,json=valueList,proto3" json:"value_list,omitempty"`
}
func (x *Partition) Reset() {
*x = Partition{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Partition) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Partition) ProtoMessage() {}
func (x *Partition) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Partition.ProtoReflect.Descriptor instead.
func (*Partition) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{8}
}
func (x *Partition) GetColumnList() [][]byte {
if x != nil {
return x.ColumnList
}
return nil
}
func (x *Partition) GetValueList() [][]byte {
if x != nil {
return x.ValueList
}
return nil
}
// This message is only for saving into store.
type TableRouteValue struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Peers []*Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"`
TableRoute *TableRoute `protobuf:"bytes,2,opt,name=table_route,json=tableRoute,proto3" json:"table_route,omitempty"`
}
func (x *TableRouteValue) Reset() {
*x = TableRouteValue{}
if protoimpl.UnsafeEnabled {
mi := &file_greptime_v1_meta_route_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *TableRouteValue) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*TableRouteValue) ProtoMessage() {}
func (x *TableRouteValue) ProtoReflect() protoreflect.Message {
mi := &file_greptime_v1_meta_route_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use TableRouteValue.ProtoReflect.Descriptor instead.
func (*TableRouteValue) Descriptor() ([]byte, []int) {
return file_greptime_v1_meta_route_proto_rawDescGZIP(), []int{9}
}
func (x *TableRouteValue) GetPeers() []*Peer {
if x != nil {
return x.Peers
}
return nil
}
func (x *TableRouteValue) GetTableRoute() *TableRoute {
if x != nil {
return x.TableRoute
}
return nil
}
var File_greptime_v1_meta_route_proto protoreflect.FileDescriptor
var file_greptime_v1_meta_route_proto_rawDesc = []byte{
0x0a, 0x1c, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x10,
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
0x1a, 0x1d, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x65,
0x74, 0x61, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0xe0, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64,
0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61,
0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74,
0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62,
0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65,
0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61,
0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66,
0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x6e,
0x66, 0x6f, 0x22, 0x85, 0x01, 0x0a, 0x0c, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65,
0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3c, 0x0a, 0x0b,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x0a,
0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x44,
0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x06,
0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68,
0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6e,
0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62,
0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d,
0x65, 0x22, 0xb8, 0x01, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20,
0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48,
0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x2c, 0x0a,
0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x3f, 0x0a, 0x0c, 0x74,
0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e,
0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52,
0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x0a,
0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x2d, 0x0a, 0x05, 0x74, 0x61,
0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62,
0x6c, 0x65, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x67,
0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x1d, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52,
0x0c, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x9f, 0x01,
0x0a, 0x0b, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x30, 0x0a,
0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e,
0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61,
0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12,
0x2a, 0x0a, 0x11, 0x6c, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69,
0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x6c, 0x65, 0x61, 0x64,
0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x32, 0x0a, 0x15, 0x66,
0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x70, 0x65, 0x65, 0x72, 0x5f, 0x69, 0x6e, 0x64,
0x65, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x04, 0x52, 0x13, 0x66, 0x6f, 0x6c, 0x6c,
0x6f, 0x77, 0x65, 0x72, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x22,
0x76, 0x0a, 0x05, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3a, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c,
0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67,
0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e,
0x54, 0x61, 0x62, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x09, 0x74, 0x61, 0x62, 0x6c, 0x65,
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x63,
0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x61, 0x62, 0x6c,
0x65, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0xdc, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69,
0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02,
0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x61, 0x72,
0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x09, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f,
0x6e, 0x12, 0x39, 0x0a, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x18, 0x64, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x23, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d,
0x65, 0x74, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x73,
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x61, 0x74, 0x74, 0x72, 0x73, 0x1a, 0x38, 0x0a, 0x0a,
0x41, 0x74, 0x74, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x09, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74,
0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x5f, 0x6c, 0x69,
0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,
0x4c, 0x69, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x69,
0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c,
0x69, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x0f, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74,
0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18,
0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x52, 0x05, 0x70,
0x65, 0x65, 0x72, 0x73, 0x12, 0x3d, 0x0a, 0x0b, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x72, 0x6f,
0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x54, 0x61, 0x62,
0x6c, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x6f,
0x75, 0x74, 0x65, 0x32, 0xf0, 0x01, 0x0a, 0x06, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x12, 0x4c,
0x0a, 0x06, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x43, 0x72, 0x65, 0x61,
0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70,
0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75,
0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4a, 0x0a, 0x05,
0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2e, 0x76, 0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4c, 0x0a, 0x06, 0x44, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76, 0x31,
0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x76,
0x31, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3c, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x54, 0x65, 0x61,
0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x2f, 0x67, 0x6f, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f,
0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_greptime_v1_meta_route_proto_rawDescOnce sync.Once
file_greptime_v1_meta_route_proto_rawDescData = file_greptime_v1_meta_route_proto_rawDesc
)
func file_greptime_v1_meta_route_proto_rawDescGZIP() []byte {
file_greptime_v1_meta_route_proto_rawDescOnce.Do(func() {
file_greptime_v1_meta_route_proto_rawDescData = protoimpl.X.CompressGZIP(file_greptime_v1_meta_route_proto_rawDescData)
})
return file_greptime_v1_meta_route_proto_rawDescData
}
var file_greptime_v1_meta_route_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_greptime_v1_meta_route_proto_goTypes = []interface{}{
(*CreateRequest)(nil), // 0: greptime.v1.meta.CreateRequest
(*RouteRequest)(nil), // 1: greptime.v1.meta.RouteRequest
(*DeleteRequest)(nil), // 2: greptime.v1.meta.DeleteRequest
(*RouteResponse)(nil), // 3: greptime.v1.meta.RouteResponse
(*TableRoute)(nil), // 4: greptime.v1.meta.TableRoute
(*RegionRoute)(nil), // 5: greptime.v1.meta.RegionRoute
(*Table)(nil), // 6: greptime.v1.meta.Table
(*Region)(nil), // 7: greptime.v1.meta.Region
(*Partition)(nil), // 8: greptime.v1.meta.Partition
(*TableRouteValue)(nil), // 9: greptime.v1.meta.TableRouteValue
nil, // 10: greptime.v1.meta.Region.AttrsEntry
(*RequestHeader)(nil), // 11: greptime.v1.meta.RequestHeader
(*TableName)(nil), // 12: greptime.v1.meta.TableName
(*ResponseHeader)(nil), // 13: greptime.v1.meta.ResponseHeader
(*Peer)(nil), // 14: greptime.v1.meta.Peer
}
var file_greptime_v1_meta_route_proto_depIdxs = []int32{
11, // 0: greptime.v1.meta.CreateRequest.header:type_name -> greptime.v1.meta.RequestHeader
12, // 1: greptime.v1.meta.CreateRequest.table_name:type_name -> greptime.v1.meta.TableName
8, // 2: greptime.v1.meta.CreateRequest.partitions:type_name -> greptime.v1.meta.Partition
11, // 3: greptime.v1.meta.RouteRequest.header:type_name -> greptime.v1.meta.RequestHeader
12, // 4: greptime.v1.meta.RouteRequest.table_names:type_name -> greptime.v1.meta.TableName
11, // 5: greptime.v1.meta.DeleteRequest.header:type_name -> greptime.v1.meta.RequestHeader
12, // 6: greptime.v1.meta.DeleteRequest.table_name:type_name -> greptime.v1.meta.TableName
13, // 7: greptime.v1.meta.RouteResponse.header:type_name -> greptime.v1.meta.ResponseHeader
14, // 8: greptime.v1.meta.RouteResponse.peers:type_name -> greptime.v1.meta.Peer
4, // 9: greptime.v1.meta.RouteResponse.table_routes:type_name -> greptime.v1.meta.TableRoute
6, // 10: greptime.v1.meta.TableRoute.table:type_name -> greptime.v1.meta.Table
5, // 11: greptime.v1.meta.TableRoute.region_routes:type_name -> greptime.v1.meta.RegionRoute
7, // 12: greptime.v1.meta.RegionRoute.region:type_name -> greptime.v1.meta.Region
12, // 13: greptime.v1.meta.Table.table_name:type_name -> greptime.v1.meta.TableName
8, // 14: greptime.v1.meta.Region.partition:type_name -> greptime.v1.meta.Partition
10, // 15: greptime.v1.meta.Region.attrs:type_name -> greptime.v1.meta.Region.AttrsEntry
14, // 16: greptime.v1.meta.TableRouteValue.peers:type_name -> greptime.v1.meta.Peer
4, // 17: greptime.v1.meta.TableRouteValue.table_route:type_name -> greptime.v1.meta.TableRoute
0, // 18: greptime.v1.meta.Router.Create:input_type -> greptime.v1.meta.CreateRequest
1, // 19: greptime.v1.meta.Router.Route:input_type -> greptime.v1.meta.RouteRequest
2, // 20: greptime.v1.meta.Router.Delete:input_type -> greptime.v1.meta.DeleteRequest
3, // 21: greptime.v1.meta.Router.Create:output_type -> greptime.v1.meta.RouteResponse
3, // 22: greptime.v1.meta.Router.Route:output_type -> greptime.v1.meta.RouteResponse
3, // 23: greptime.v1.meta.Router.Delete:output_type -> greptime.v1.meta.RouteResponse
21, // [21:24] is the sub-list for method output_type
18, // [18:21] is the sub-list for method input_type
18, // [18:18] is the sub-list for extension type_name
18, // [18:18] is the sub-list for extension extendee
0, // [0:18] is the sub-list for field type_name
}
func init() { file_greptime_v1_meta_route_proto_init() }
func file_greptime_v1_meta_route_proto_init() {
if File_greptime_v1_meta_route_proto != nil {
return
}
file_greptime_v1_meta_common_proto_init()
if !protoimpl.UnsafeEnabled {
file_greptime_v1_meta_route_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*CreateRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RouteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RouteResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TableRoute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*RegionRoute); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Table); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Region); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Partition); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_greptime_v1_meta_route_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*TableRouteValue); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_greptime_v1_meta_route_proto_rawDesc,
NumEnums: 0,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_greptime_v1_meta_route_proto_goTypes,
DependencyIndexes: file_greptime_v1_meta_route_proto_depIdxs,
MessageInfos: file_greptime_v1_meta_route_proto_msgTypes,
}.Build()
File_greptime_v1_meta_route_proto = out.File
file_greptime_v1_meta_route_proto_rawDesc = nil
file_greptime_v1_meta_route_proto_goTypes = nil
file_greptime_v1_meta_route_proto_depIdxs = nil
}
+221
View File
@@ -0,0 +1,221 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/meta/route.proto
package meta
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// RouterClient is the client API for Router service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type RouterClient interface {
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*RouteResponse, error)
// Fetch routing information for tables. The smallest unit is the complete
// routing information(all regions) of a table.
//
// ```text
// table_1
//
// table_name
// table_schema
// regions
// region_1
// leader_peer
// follower_peer_1, follower_peer_2
// region_2
// leader_peer
// follower_peer_1, follower_peer_2, follower_peer_3
// region_xxx
//
// table_2
//
// ...
//
// ```
Route(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error)
Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*RouteResponse, error)
}
type routerClient struct {
cc grpc.ClientConnInterface
}
func NewRouterClient(cc grpc.ClientConnInterface) RouterClient {
return &routerClient{cc}
}
func (c *routerClient) Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*RouteResponse, error) {
out := new(RouteResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *routerClient) Route(ctx context.Context, in *RouteRequest, opts ...grpc.CallOption) (*RouteResponse, error) {
out := new(RouteResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Route", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *routerClient) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*RouteResponse, error) {
out := new(RouteResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Router/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// RouterServer is the server API for Router service.
// All implementations must embed UnimplementedRouterServer
// for forward compatibility
type RouterServer interface {
Create(context.Context, *CreateRequest) (*RouteResponse, error)
// Fetch routing information for tables. The smallest unit is the complete
// routing information(all regions) of a table.
//
// ```text
// table_1
//
// table_name
// table_schema
// regions
// region_1
// leader_peer
// follower_peer_1, follower_peer_2
// region_2
// leader_peer
// follower_peer_1, follower_peer_2, follower_peer_3
// region_xxx
//
// table_2
//
// ...
//
// ```
Route(context.Context, *RouteRequest) (*RouteResponse, error)
Delete(context.Context, *DeleteRequest) (*RouteResponse, error)
mustEmbedUnimplementedRouterServer()
}
// UnimplementedRouterServer must be embedded to have forward compatible implementations.
type UnimplementedRouterServer struct {
}
func (UnimplementedRouterServer) Create(context.Context, *CreateRequest) (*RouteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedRouterServer) Route(context.Context, *RouteRequest) (*RouteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Route not implemented")
}
func (UnimplementedRouterServer) Delete(context.Context, *DeleteRequest) (*RouteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedRouterServer) mustEmbedUnimplementedRouterServer() {}
// UnsafeRouterServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RouterServer will
// result in compilation errors.
type UnsafeRouterServer interface {
mustEmbedUnimplementedRouterServer()
}
func RegisterRouterServer(s grpc.ServiceRegistrar, srv RouterServer) {
s.RegisterService(&Router_ServiceDesc, srv)
}
func _Router_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RouterServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Router/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RouterServer).Create(ctx, req.(*CreateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Router_Route_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RouteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RouterServer).Route(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Router/Route",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RouterServer).Route(ctx, req.(*RouteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Router_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(RouterServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Router/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(RouterServer).Delete(ctx, req.(*DeleteRequest))
}
return interceptor(ctx, in, info, handler)
}
// Router_ServiceDesc is the grpc.ServiceDesc for Router service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Router_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.meta.Router",
HandlerType: (*RouterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _Router_Create_Handler,
},
{
MethodName: "Route",
Handler: _Router_Route_Handler,
},
{
MethodName: "Delete",
Handler: _Router_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/meta/route.proto",
}
File diff suppressed because it is too large Load Diff
+299
View File
@@ -0,0 +1,299 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.6
// source: greptime/v1/meta/store.proto
package meta
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// StoreClient is the client API for Store service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type StoreClient interface {
// Range gets the keys in the range from the key-value store.
Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error)
// Put puts the given key into the key-value store.
Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error)
// BatchPut atomically puts the given keys into the key-value store.
BatchPut(ctx context.Context, in *BatchPutRequest, opts ...grpc.CallOption) (*BatchPutResponse, error)
// CompareAndPut atomically puts the value to the given updated
// value if the current value == the expected value.
CompareAndPut(ctx context.Context, in *CompareAndPutRequest, opts ...grpc.CallOption) (*CompareAndPutResponse, error)
// DeleteRange deletes the given range from the key-value store.
DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error)
// MoveValue atomically renames the key to the given updated key.
MoveValue(ctx context.Context, in *MoveValueRequest, opts ...grpc.CallOption) (*MoveValueResponse, error)
}
type storeClient struct {
cc grpc.ClientConnInterface
}
func NewStoreClient(cc grpc.ClientConnInterface) StoreClient {
return &storeClient{cc}
}
func (c *storeClient) Range(ctx context.Context, in *RangeRequest, opts ...grpc.CallOption) (*RangeResponse, error) {
out := new(RangeResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/Range", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) Put(ctx context.Context, in *PutRequest, opts ...grpc.CallOption) (*PutResponse, error) {
out := new(PutResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/Put", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) BatchPut(ctx context.Context, in *BatchPutRequest, opts ...grpc.CallOption) (*BatchPutResponse, error) {
out := new(BatchPutResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/BatchPut", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) CompareAndPut(ctx context.Context, in *CompareAndPutRequest, opts ...grpc.CallOption) (*CompareAndPutResponse, error) {
out := new(CompareAndPutResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/CompareAndPut", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) DeleteRange(ctx context.Context, in *DeleteRangeRequest, opts ...grpc.CallOption) (*DeleteRangeResponse, error) {
out := new(DeleteRangeResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/DeleteRange", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *storeClient) MoveValue(ctx context.Context, in *MoveValueRequest, opts ...grpc.CallOption) (*MoveValueResponse, error) {
out := new(MoveValueResponse)
err := c.cc.Invoke(ctx, "/greptime.v1.meta.Store/MoveValue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// StoreServer is the server API for Store service.
// All implementations must embed UnimplementedStoreServer
// for forward compatibility
type StoreServer interface {
// Range gets the keys in the range from the key-value store.
Range(context.Context, *RangeRequest) (*RangeResponse, error)
// Put puts the given key into the key-value store.
Put(context.Context, *PutRequest) (*PutResponse, error)
// BatchPut atomically puts the given keys into the key-value store.
BatchPut(context.Context, *BatchPutRequest) (*BatchPutResponse, error)
// CompareAndPut atomically puts the value to the given updated
// value if the current value == the expected value.
CompareAndPut(context.Context, *CompareAndPutRequest) (*CompareAndPutResponse, error)
// DeleteRange deletes the given range from the key-value store.
DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error)
// MoveValue atomically renames the key to the given updated key.
MoveValue(context.Context, *MoveValueRequest) (*MoveValueResponse, error)
mustEmbedUnimplementedStoreServer()
}
// UnimplementedStoreServer must be embedded to have forward compatible implementations.
type UnimplementedStoreServer struct {
}
func (UnimplementedStoreServer) Range(context.Context, *RangeRequest) (*RangeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Range not implemented")
}
func (UnimplementedStoreServer) Put(context.Context, *PutRequest) (*PutResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Put not implemented")
}
func (UnimplementedStoreServer) BatchPut(context.Context, *BatchPutRequest) (*BatchPutResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method BatchPut not implemented")
}
func (UnimplementedStoreServer) CompareAndPut(context.Context, *CompareAndPutRequest) (*CompareAndPutResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CompareAndPut not implemented")
}
func (UnimplementedStoreServer) DeleteRange(context.Context, *DeleteRangeRequest) (*DeleteRangeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteRange not implemented")
}
func (UnimplementedStoreServer) MoveValue(context.Context, *MoveValueRequest) (*MoveValueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method MoveValue not implemented")
}
func (UnimplementedStoreServer) mustEmbedUnimplementedStoreServer() {}
// UnsafeStoreServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StoreServer will
// result in compilation errors.
type UnsafeStoreServer interface {
mustEmbedUnimplementedStoreServer()
}
func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer) {
s.RegisterService(&Store_ServiceDesc, srv)
}
func _Store_Range_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RangeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).Range(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Store/Range",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).Range(ctx, req.(*RangeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_Put_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PutRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).Put(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Store/Put",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).Put(ctx, req.(*PutRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_BatchPut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchPutRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).BatchPut(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Store/BatchPut",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).BatchPut(ctx, req.(*BatchPutRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_CompareAndPut_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CompareAndPutRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).CompareAndPut(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Store/CompareAndPut",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).CompareAndPut(ctx, req.(*CompareAndPutRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_DeleteRange_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRangeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).DeleteRange(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Store/DeleteRange",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).DeleteRange(ctx, req.(*DeleteRangeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Store_MoveValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MoveValueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StoreServer).MoveValue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/greptime.v1.meta.Store/MoveValue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StoreServer).MoveValue(ctx, req.(*MoveValueRequest))
}
return interceptor(ctx, in, info, handler)
}
// Store_ServiceDesc is the grpc.ServiceDesc for Store service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Store_ServiceDesc = grpc.ServiceDesc{
ServiceName: "greptime.v1.meta.Store",
HandlerType: (*StoreServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Range",
Handler: _Store_Range_Handler,
},
{
MethodName: "Put",
Handler: _Store_Put_Handler,
},
{
MethodName: "BatchPut",
Handler: _Store_BatchPut_Handler,
},
{
MethodName: "CompareAndPut",
Handler: _Store_CompareAndPut_Handler,
},
{
MethodName: "DeleteRange",
Handler: _Store_DeleteRange_Handler,
},
{
MethodName: "MoveValue",
Handler: _Store_MoveValue_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "greptime/v1/meta/store.proto",
}
+647
View File
@@ -0,0 +1,647 @@
// Copyright 2016 Prometheus Team
// Licensed 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.
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.1
// protoc v3.21.6
// source: prometheus/remote/remote.proto
package remote
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type ReadRequest_ResponseType int32
const (
// Server will return a single ReadResponse message with matched series that includes list of raw samples.
// It's recommended to use streamed response types instead.
//
// Response headers:
// Content-Type: "application/x-protobuf"
// Content-Encoding: "snappy"
ReadRequest_SAMPLES ReadRequest_ResponseType = 0
// Server will stream a delimited ChunkedReadResponse message that contains XOR encoded chunks for a single series.
// Each message is following varint size and fixed size bigendian uint32 for CRC32 Castagnoli checksum.
//
// Response headers:
// Content-Type: "application/x-streamed-protobuf; proto=prometheus.ChunkedReadResponse"
// Content-Encoding: ""
ReadRequest_STREAMED_XOR_CHUNKS ReadRequest_ResponseType = 1
)
// Enum value maps for ReadRequest_ResponseType.
var (
ReadRequest_ResponseType_name = map[int32]string{
0: "SAMPLES",
1: "STREAMED_XOR_CHUNKS",
}
ReadRequest_ResponseType_value = map[string]int32{
"SAMPLES": 0,
"STREAMED_XOR_CHUNKS": 1,
}
)
func (x ReadRequest_ResponseType) Enum() *ReadRequest_ResponseType {
p := new(ReadRequest_ResponseType)
*p = x
return p
}
func (x ReadRequest_ResponseType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ReadRequest_ResponseType) Descriptor() protoreflect.EnumDescriptor {
return file_prometheus_remote_remote_proto_enumTypes[0].Descriptor()
}
func (ReadRequest_ResponseType) Type() protoreflect.EnumType {
return &file_prometheus_remote_remote_proto_enumTypes[0]
}
func (x ReadRequest_ResponseType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ReadRequest_ResponseType.Descriptor instead.
func (ReadRequest_ResponseType) EnumDescriptor() ([]byte, []int) {
return file_prometheus_remote_remote_proto_rawDescGZIP(), []int{1, 0}
}
type WriteRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries,proto3" json:"timeseries,omitempty"`
Metadata []*MetricMetadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"`
}
func (x *WriteRequest) Reset() {
*x = WriteRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_prometheus_remote_remote_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WriteRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WriteRequest) ProtoMessage() {}
func (x *WriteRequest) ProtoReflect() protoreflect.Message {
mi := &file_prometheus_remote_remote_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WriteRequest.ProtoReflect.Descriptor instead.
func (*WriteRequest) Descriptor() ([]byte, []int) {
return file_prometheus_remote_remote_proto_rawDescGZIP(), []int{0}
}
func (x *WriteRequest) GetTimeseries() []*TimeSeries {
if x != nil {
return x.Timeseries
}
return nil
}
func (x *WriteRequest) GetMetadata() []*MetricMetadata {
if x != nil {
return x.Metadata
}
return nil
}
// ReadRequest represents a remote read request.
type ReadRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Queries []*Query `protobuf:"bytes,1,rep,name=queries,proto3" json:"queries,omitempty"`
// accepted_response_types allows negotiating the content type of the response.
//
// Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
// implemented by server, error is returned.
// For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
AcceptedResponseTypes []ReadRequest_ResponseType `protobuf:"varint,2,rep,packed,name=accepted_response_types,json=acceptedResponseTypes,proto3,enum=prometheus.ReadRequest_ResponseType" json:"accepted_response_types,omitempty"`
}
func (x *ReadRequest) Reset() {
*x = ReadRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_prometheus_remote_remote_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReadRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReadRequest) ProtoMessage() {}
func (x *ReadRequest) ProtoReflect() protoreflect.Message {
mi := &file_prometheus_remote_remote_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead.
func (*ReadRequest) Descriptor() ([]byte, []int) {
return file_prometheus_remote_remote_proto_rawDescGZIP(), []int{1}
}
func (x *ReadRequest) GetQueries() []*Query {
if x != nil {
return x.Queries
}
return nil
}
func (x *ReadRequest) GetAcceptedResponseTypes() []ReadRequest_ResponseType {
if x != nil {
return x.AcceptedResponseTypes
}
return nil
}
// ReadResponse is a response when response_type equals SAMPLES.
type ReadResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// In same order as the request's queries.
Results []*QueryResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
}
func (x *ReadResponse) Reset() {
*x = ReadResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_prometheus_remote_remote_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ReadResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ReadResponse) ProtoMessage() {}
func (x *ReadResponse) ProtoReflect() protoreflect.Message {
mi := &file_prometheus_remote_remote_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead.
func (*ReadResponse) Descriptor() ([]byte, []int) {
return file_prometheus_remote_remote_proto_rawDescGZIP(), []int{2}
}
func (x *ReadResponse) GetResults() []*QueryResult {
if x != nil {
return x.Results
}
return nil
}
type Query struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
StartTimestampMs int64 `protobuf:"varint,1,opt,name=start_timestamp_ms,json=startTimestampMs,proto3" json:"start_timestamp_ms,omitempty"`
EndTimestampMs int64 `protobuf:"varint,2,opt,name=end_timestamp_ms,json=endTimestampMs,proto3" json:"end_timestamp_ms,omitempty"`
Matchers []*LabelMatcher `protobuf:"bytes,3,rep,name=matchers,proto3" json:"matchers,omitempty"`
Hints *ReadHints `protobuf:"bytes,4,opt,name=hints,proto3" json:"hints,omitempty"`
}
func (x *Query) Reset() {
*x = Query{}
if protoimpl.UnsafeEnabled {
mi := &file_prometheus_remote_remote_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Query) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Query) ProtoMessage() {}
func (x *Query) ProtoReflect() protoreflect.Message {
mi := &file_prometheus_remote_remote_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Query.ProtoReflect.Descriptor instead.
func (*Query) Descriptor() ([]byte, []int) {
return file_prometheus_remote_remote_proto_rawDescGZIP(), []int{3}
}
func (x *Query) GetStartTimestampMs() int64 {
if x != nil {
return x.StartTimestampMs
}
return 0
}
func (x *Query) GetEndTimestampMs() int64 {
if x != nil {
return x.EndTimestampMs
}
return 0
}
func (x *Query) GetMatchers() []*LabelMatcher {
if x != nil {
return x.Matchers
}
return nil
}
func (x *Query) GetHints() *ReadHints {
if x != nil {
return x.Hints
}
return nil
}
type QueryResult struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Samples within a time series must be ordered by time.
Timeseries []*TimeSeries `protobuf:"bytes,1,rep,name=timeseries,proto3" json:"timeseries,omitempty"`
}
func (x *QueryResult) Reset() {
*x = QueryResult{}
if protoimpl.UnsafeEnabled {
mi := &file_prometheus_remote_remote_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *QueryResult) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*QueryResult) ProtoMessage() {}
func (x *QueryResult) ProtoReflect() protoreflect.Message {
mi := &file_prometheus_remote_remote_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use QueryResult.ProtoReflect.Descriptor instead.
func (*QueryResult) Descriptor() ([]byte, []int) {
return file_prometheus_remote_remote_proto_rawDescGZIP(), []int{4}
}
func (x *QueryResult) GetTimeseries() []*TimeSeries {
if x != nil {
return x.Timeseries
}
return nil
}
// ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
// We strictly stream full series after series, optionally split by time. This means that a single frame can contain
// partition of the single series, but once a new series is started to be streamed it means that no more chunks will
// be sent for previous one. Series are returned sorted in the same way TSDB block are internally.
type ChunkedReadResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
ChunkedSeries []*ChunkedSeries `protobuf:"bytes,1,rep,name=chunked_series,json=chunkedSeries,proto3" json:"chunked_series,omitempty"`
// query_index represents an index of the query from ReadRequest.queries these chunks relates to.
QueryIndex int64 `protobuf:"varint,2,opt,name=query_index,json=queryIndex,proto3" json:"query_index,omitempty"`
}
func (x *ChunkedReadResponse) Reset() {
*x = ChunkedReadResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_prometheus_remote_remote_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ChunkedReadResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ChunkedReadResponse) ProtoMessage() {}
func (x *ChunkedReadResponse) ProtoReflect() protoreflect.Message {
mi := &file_prometheus_remote_remote_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use ChunkedReadResponse.ProtoReflect.Descriptor instead.
func (*ChunkedReadResponse) Descriptor() ([]byte, []int) {
return file_prometheus_remote_remote_proto_rawDescGZIP(), []int{5}
}
func (x *ChunkedReadResponse) GetChunkedSeries() []*ChunkedSeries {
if x != nil {
return x.ChunkedSeries
}
return nil
}
func (x *ChunkedReadResponse) GetQueryIndex() int64 {
if x != nil {
return x.QueryIndex
}
return 0
}
var File_prometheus_remote_remote_proto protoreflect.FileDescriptor
var file_prometheus_remote_remote_proto_rawDesc = []byte{
0x0a, 0x1e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x6d,
0x6f, 0x74, 0x65, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x12, 0x0a, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x1a, 0x1d, 0x70, 0x72,
0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x2f,
0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x84, 0x01, 0x0a, 0x0c,
0x57, 0x72, 0x69, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x36, 0x0a, 0x0a,
0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x16, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x54, 0x69,
0x6d, 0x65, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65,
0x72, 0x69, 0x65, 0x73, 0x12, 0x36, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68,
0x65, 0x75, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x02,
0x10, 0x03, 0x22, 0xce, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20,
0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73,
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x07, 0x71, 0x75, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12,
0x5c, 0x0a, 0x17, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e,
0x32, 0x24, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x52, 0x65,
0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x15, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x34, 0x0a,
0x0c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a,
0x07, 0x53, 0x41, 0x4d, 0x50, 0x4c, 0x45, 0x53, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54,
0x52, 0x45, 0x41, 0x4d, 0x45, 0x44, 0x5f, 0x58, 0x4f, 0x52, 0x5f, 0x43, 0x48, 0x55, 0x4e, 0x4b,
0x53, 0x10, 0x01, 0x22, 0x41, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01,
0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75,
0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x07, 0x72,
0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79,
0x12, 0x2c, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
0x61, 0x6d, 0x70, 0x5f, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x73, 0x74,
0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x73, 0x12, 0x28,
0x0a, 0x10, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f,
0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x4d, 0x73, 0x12, 0x34, 0x0a, 0x08, 0x6d, 0x61, 0x74, 0x63,
0x68, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x72, 0x6f,
0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x4d, 0x61, 0x74,
0x63, 0x68, 0x65, 0x72, 0x52, 0x08, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x73, 0x12, 0x2b,
0x0a, 0x05, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x48,
0x69, 0x6e, 0x74, 0x73, 0x52, 0x05, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x0b, 0x51,
0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x36, 0x0a, 0x0a, 0x74, 0x69,
0x6d, 0x65, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16,
0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x54, 0x69, 0x6d, 0x65,
0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x65, 0x72, 0x69,
0x65, 0x73, 0x22, 0x78, 0x0a, 0x13, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x52, 0x65, 0x61,
0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0e, 0x63, 0x68, 0x75,
0x6e, 0x6b, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
0x0b, 0x32, 0x19, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x43,
0x68, 0x75, 0x6e, 0x6b, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x52, 0x0d, 0x63, 0x68,
0x75, 0x6e, 0x6b, 0x65, 0x64, 0x53, 0x65, 0x72, 0x69, 0x65, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x71,
0x75, 0x65, 0x72, 0x79, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03,
0x52, 0x0a, 0x71, 0x75, 0x65, 0x72, 0x79, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x42, 0x3d, 0x5a, 0x3b,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x65, 0x70, 0x74,
0x69, 0x6d, 0x65, 0x54, 0x65, 0x61, 0x6d, 0x2f, 0x67, 0x72, 0x65, 0x70, 0x74, 0x69, 0x6d, 0x65,
0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74,
0x68, 0x65, 0x75, 0x73, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
file_prometheus_remote_remote_proto_rawDescOnce sync.Once
file_prometheus_remote_remote_proto_rawDescData = file_prometheus_remote_remote_proto_rawDesc
)
func file_prometheus_remote_remote_proto_rawDescGZIP() []byte {
file_prometheus_remote_remote_proto_rawDescOnce.Do(func() {
file_prometheus_remote_remote_proto_rawDescData = protoimpl.X.CompressGZIP(file_prometheus_remote_remote_proto_rawDescData)
})
return file_prometheus_remote_remote_proto_rawDescData
}
var file_prometheus_remote_remote_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_prometheus_remote_remote_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_prometheus_remote_remote_proto_goTypes = []interface{}{
(ReadRequest_ResponseType)(0), // 0: prometheus.ReadRequest.ResponseType
(*WriteRequest)(nil), // 1: prometheus.WriteRequest
(*ReadRequest)(nil), // 2: prometheus.ReadRequest
(*ReadResponse)(nil), // 3: prometheus.ReadResponse
(*Query)(nil), // 4: prometheus.Query
(*QueryResult)(nil), // 5: prometheus.QueryResult
(*ChunkedReadResponse)(nil), // 6: prometheus.ChunkedReadResponse
(*TimeSeries)(nil), // 7: prometheus.TimeSeries
(*MetricMetadata)(nil), // 8: prometheus.MetricMetadata
(*LabelMatcher)(nil), // 9: prometheus.LabelMatcher
(*ReadHints)(nil), // 10: prometheus.ReadHints
(*ChunkedSeries)(nil), // 11: prometheus.ChunkedSeries
}
var file_prometheus_remote_remote_proto_depIdxs = []int32{
7, // 0: prometheus.WriteRequest.timeseries:type_name -> prometheus.TimeSeries
8, // 1: prometheus.WriteRequest.metadata:type_name -> prometheus.MetricMetadata
4, // 2: prometheus.ReadRequest.queries:type_name -> prometheus.Query
0, // 3: prometheus.ReadRequest.accepted_response_types:type_name -> prometheus.ReadRequest.ResponseType
5, // 4: prometheus.ReadResponse.results:type_name -> prometheus.QueryResult
9, // 5: prometheus.Query.matchers:type_name -> prometheus.LabelMatcher
10, // 6: prometheus.Query.hints:type_name -> prometheus.ReadHints
7, // 7: prometheus.QueryResult.timeseries:type_name -> prometheus.TimeSeries
11, // 8: prometheus.ChunkedReadResponse.chunked_series:type_name -> prometheus.ChunkedSeries
9, // [9:9] is the sub-list for method output_type
9, // [9:9] is the sub-list for method input_type
9, // [9:9] is the sub-list for extension type_name
9, // [9:9] is the sub-list for extension extendee
0, // [0:9] is the sub-list for field type_name
}
func init() { file_prometheus_remote_remote_proto_init() }
func file_prometheus_remote_remote_proto_init() {
if File_prometheus_remote_remote_proto != nil {
return
}
file_prometheus_remote_types_proto_init()
if !protoimpl.UnsafeEnabled {
file_prometheus_remote_remote_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WriteRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_prometheus_remote_remote_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReadRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_prometheus_remote_remote_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ReadResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_prometheus_remote_remote_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Query); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_prometheus_remote_remote_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*QueryResult); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_prometheus_remote_remote_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ChunkedReadResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_prometheus_remote_remote_proto_rawDesc,
NumEnums: 1,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_prometheus_remote_remote_proto_goTypes,
DependencyIndexes: file_prometheus_remote_remote_proto_depIdxs,
EnumInfos: file_prometheus_remote_remote_proto_enumTypes,
MessageInfos: file_prometheus_remote_remote_proto_msgTypes,
}.Build()
File_prometheus_remote_remote_proto = out.File
file_prometheus_remote_remote_proto_rawDesc = nil
file_prometheus_remote_remote_proto_goTypes = nil
file_prometheus_remote_remote_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
+1
View File
@@ -4,6 +4,7 @@ package greptime.v1;
option java_package="io.greptime.v1"; option java_package="io.greptime.v1";
option java_outer_classname = "Columns"; option java_outer_classname = "Columns";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
message Column { message Column {
string column_name = 1; string column_name = 1;
+1
View File
@@ -4,6 +4,7 @@ package greptime.v1;
option java_package = "io.greptime.v1"; option java_package = "io.greptime.v1";
option java_outer_classname = "Database"; option java_outer_classname = "Database";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
import "greptime/v1/ddl.proto"; import "greptime/v1/ddl.proto";
import "greptime/v1/column.proto"; import "greptime/v1/column.proto";
+1
View File
@@ -4,6 +4,7 @@ package greptime.v1;
option java_package = "io.greptime.v1"; option java_package = "io.greptime.v1";
option java_outer_classname = "Ddl"; option java_outer_classname = "Ddl";
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1";
import "greptime/v1/column.proto"; import "greptime/v1/column.proto";
+2
View File
@@ -2,6 +2,8 @@ syntax = "proto3";
package greptime.v1.meta; package greptime.v1.meta;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/common.proto";
import "greptime/v1/meta/store.proto"; import "greptime/v1/meta/store.proto";
+2
View File
@@ -2,6 +2,8 @@ syntax = "proto3";
package greptime.v1.meta; package greptime.v1.meta;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
message RequestHeader { message RequestHeader {
uint64 protocol_version = 1; uint64 protocol_version = 1;
// cluster_id is the ID of the cluster which be sent to. // cluster_id is the ID of the cluster which be sent to.
+2
View File
@@ -2,6 +2,8 @@ syntax = "proto3";
package greptime.v1.meta; package greptime.v1.meta;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/common.proto";
service Heartbeat { service Heartbeat {
+2
View File
@@ -2,6 +2,8 @@ syntax = "proto3";
package greptime.v1.meta; package greptime.v1.meta;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/common.proto";
service Lock { service Lock {
+2
View File
@@ -2,6 +2,8 @@ syntax = "proto3";
package greptime.v1.meta; package greptime.v1.meta;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/common.proto";
service Router { service Router {
+2
View File
@@ -2,6 +2,8 @@ syntax = "proto3";
package greptime.v1.meta; package greptime.v1.meta;
option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta";
import "greptime/v1/meta/common.proto"; import "greptime/v1/meta/common.proto";
service Store { service Store {
+3 -1
View File
@@ -14,7 +14,9 @@
syntax = "proto3"; syntax = "proto3";
package prometheus; package prometheus;
option go_package = "prompb"; // GreptimeTeam modify the original go_package definition to make it constistent with the go package name.
// And we also remove the gogoproto dependency which is now deprecated.
option go_package = "github.com/GreptimeTeam/greptime-proto/go/prometheus/remote";
import "prometheus/remote/types.proto"; import "prometheus/remote/types.proto";
+3 -1
View File
@@ -14,7 +14,9 @@
syntax = "proto3"; syntax = "proto3";
package prometheus; package prometheus;
option go_package = "prompb"; // GreptimeTeam modify the original go_package definition to make it constistent with the go package name.
// And we also remove the gogoproto dependency which is now deprecated.
option go_package = "github.com/GreptimeTeam/greptime-proto/go/prometheus/remote";
message MetricMetadata { message MetricMetadata {
enum MetricType { enum MetricType {
+18
View File
@@ -0,0 +1,18 @@
#! /usr/bin/env bash
set -e
GO_OUTPUT=./go
# TODO(zyy17): Can we make the following commands as one command?
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/greptime/v1/meta/*.proto
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/greptime/v1/*.proto
protoc --go_out=${GO_OUTPUT} --go_opt=paths=source_relative \
--go-grpc_out=${GO_OUTPUT} --go-grpc_opt=paths=source_relative \
-Iproto proto/prometheus/remote/*.proto