diff --git a/go/greptime/v1/column.pb.go b/go/greptime/v1/column.pb.go index e70122f..7234e03 100644 --- a/go/greptime/v1/column.pb.go +++ b/go/greptime/v1/column.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 @@ -175,7 +189,8 @@ type Column struct { 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); + // 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 @@ -184,7 +199,8 @@ type Column struct { // 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. + // 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"` diff --git a/go/greptime/v1/common.pb.go b/go/greptime/v1/common.pb.go index f36601b..b4b3ef3 100644 --- a/go/greptime/v1/common.pb.go +++ b/go/greptime/v1/common.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 diff --git a/go/greptime/v1/database.pb.go b/go/greptime/v1/database.pb.go index 515b68a..a41371c 100644 --- a/go/greptime/v1/database.pb.go +++ b/go/greptime/v1/database.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 @@ -388,7 +402,8 @@ type DeleteRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The table name to delete from. Catalog name and schema name are in the `RequestHeader`. + // The table name to delete from. Catalog name and schema name are in the + // `RequestHeader`. TableName string `protobuf:"bytes,1,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"` // The region number of current delete request. RegionNumber uint32 `protobuf:"varint,2,opt,name=region_number,json=regionNumber,proto3" json:"region_number,omitempty"` diff --git a/go/greptime/v1/ddl.pb.go b/go/greptime/v1/ddl.pb.go index 7328e43..2378bf4 100644 --- a/go/greptime/v1/ddl.pb.go +++ b/go/greptime/v1/ddl.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 @@ -20,8 +34,9 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// "Data Definition Language" requests, that create, modify or delete the database structures but not the data. -// `DdlRequest` could carry more information than plain SQL, for example, the "table_id" in `CreateTableExpr`. +// "Data Definition Language" requests, that create, modify or delete the +// database structures but not the data. `DdlRequest` could carry more +// information than plain SQL, for example, the "table_id" in `CreateTableExpr`. // So create a new DDL expr if you need it. type DdlRequest struct { state protoimpl.MessageState diff --git a/go/greptime/v1/health.pb.go b/go/greptime/v1/health.pb.go index fa3c9c7..b44495d 100644 --- a/go/greptime/v1/health.pb.go +++ b/go/greptime/v1/health.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 diff --git a/go/greptime/v1/meta/cluster.pb.go b/go/greptime/v1/meta/cluster.pb.go index 1825414..3796016 100644 --- a/go/greptime/v1/meta/cluster.pb.go +++ b/go/greptime/v1/meta/cluster.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 diff --git a/go/greptime/v1/meta/common.pb.go b/go/greptime/v1/meta/common.pb.go index 778faa2..db55432 100644 --- a/go/greptime/v1/meta/common.pb.go +++ b/go/greptime/v1/meta/common.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 diff --git a/go/greptime/v1/meta/heartbeat.pb.go b/go/greptime/v1/meta/heartbeat.pb.go index b3e4b16..2fc9c5b 100644 --- a/go/greptime/v1/meta/heartbeat.pb.go +++ b/go/greptime/v1/meta/heartbeat.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 @@ -574,7 +588,8 @@ type MailboxMessage struct { // The id is used to associate request and response. Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - // The following information plays a bigger role in making messages traceable and facilitating debugging. + // The following information plays a bigger role in making messages traceable + // and facilitating debugging. Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` From string `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"` To string `protobuf:"bytes,4,opt,name=to,proto3" json:"to,omitempty"` diff --git a/go/greptime/v1/meta/heartbeat_grpc.pb.go b/go/greptime/v1/meta/heartbeat_grpc.pb.go index 814728d..0c03052 100644 --- a/go/greptime/v1/meta/heartbeat_grpc.pb.go +++ b/go/greptime/v1/meta/heartbeat_grpc.pb.go @@ -23,7 +23,8 @@ const _ = grpc.SupportPackageIsVersion7 // 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. + // 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) @@ -84,7 +85,8 @@ func (c *heartbeatClient) AskLeader(ctx context.Context, in *AskLeaderRequest, o // 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. + // 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 diff --git a/go/greptime/v1/meta/lock.pb.go b/go/greptime/v1/meta/lock.pb.go index 1ae6c13..9f7c77c 100644 --- a/go/greptime/v1/meta/lock.pb.go +++ b/go/greptime/v1/meta/lock.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 @@ -28,8 +42,8 @@ type LockRequest struct { 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. + // 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"` } diff --git a/go/greptime/v1/meta/lock_grpc.pb.go b/go/greptime/v1/meta/lock_grpc.pb.go index 775babd..2980e5b 100644 --- a/go/greptime/v1/meta/lock_grpc.pb.go +++ b/go/greptime/v1/meta/lock_grpc.pb.go @@ -22,8 +22,9 @@ const _ = grpc.SupportPackageIsVersion7 // // 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 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) @@ -59,8 +60,9 @@ func (c *lockClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc // 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 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) diff --git a/go/greptime/v1/meta/route.pb.go b/go/greptime/v1/meta/route.pb.go index 0a57217..b11a9e6 100644 --- a/go/greptime/v1/meta/route.pb.go +++ b/go/greptime/v1/meta/route.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 diff --git a/go/greptime/v1/meta/store.pb.go b/go/greptime/v1/meta/store.pb.go index 0c18056..be9485e 100644 --- a/go/greptime/v1/meta/store.pb.go +++ b/go/greptime/v1/meta/store.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 diff --git a/go/greptime/v1/prom.pb.go b/go/greptime/v1/prom.pb.go index bd2d598..f4b1ea1 100644 --- a/go/greptime/v1/prom.pb.go +++ b/go/greptime/v1/prom.pb.go @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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 diff --git a/proto/greptime/v1/column.proto b/proto/greptime/v1/column.proto index e32b69a..bb9f8b6 100644 --- a/proto/greptime/v1/column.proto +++ b/proto/greptime/v1/column.proto @@ -1,8 +1,22 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1; -option java_package="io.greptime.v1"; +option java_package = "io.greptime.v1"; option java_outer_classname = "Columns"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; @@ -43,7 +57,8 @@ message Column { } // 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); + // 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 @@ -52,7 +67,8 @@ message Column { Values values = 3; // 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. + // If a bit in null_mask is 1, it indicates that the column value at that + // position is null. bytes null_mask = 4; // Helpful in creating vector from column. diff --git a/proto/greptime/v1/common.proto b/proto/greptime/v1/common.proto index c168103..e332fd9 100644 --- a/proto/greptime/v1/common.proto +++ b/proto/greptime/v1/common.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1; @@ -31,14 +45,8 @@ message Basic { string password = 2; } -message Token { - string token = 1; -} +message Token { string token = 1; } -message AffectedRows { - uint32 value = 1; -} +message AffectedRows { uint32 value = 1; } -message FlightMetadata { - AffectedRows affected_rows = 1; -} +message FlightMetadata { AffectedRows affected_rows = 1; } diff --git a/proto/greptime/v1/database.proto b/proto/greptime/v1/database.proto index e77c7c9..7fa7fb0 100644 --- a/proto/greptime/v1/database.proto +++ b/proto/greptime/v1/database.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1; @@ -29,9 +43,7 @@ message GreptimeRequest { message GreptimeResponse { ResponseHeader header = 1; - oneof response { - AffectedRows affected_rows = 2; - } + oneof response { AffectedRows affected_rows = 2; } } message QueryRequest { @@ -58,7 +70,8 @@ message InsertRequest { } message DeleteRequest { - // The table name to delete from. Catalog name and schema name are in the `RequestHeader`. + // The table name to delete from. Catalog name and schema name are in the + // `RequestHeader`. string table_name = 1; // The region number of current delete request. diff --git a/proto/greptime/v1/ddl.proto b/proto/greptime/v1/ddl.proto index a970543..9270cc8 100644 --- a/proto/greptime/v1/ddl.proto +++ b/proto/greptime/v1/ddl.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1; @@ -8,8 +22,9 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; import "greptime/v1/column.proto"; -// "Data Definition Language" requests, that create, modify or delete the database structures but not the data. -// `DdlRequest` could carry more information than plain SQL, for example, the "table_id" in `CreateTableExpr`. +// "Data Definition Language" requests, that create, modify or delete the +// database structures but not the data. `DdlRequest` could carry more +// information than plain SQL, for example, the "table_id" in `CreateTableExpr`. // So create a new DDL expr if you need it. message DdlRequest { oneof expr { @@ -58,35 +73,25 @@ message FlushTableExpr { string schema_name = 2; string table_name = 3; optional uint32 region_id = 4; -} +} message CreateDatabaseExpr { - //TODO(hl): maybe rename to schema_name? + // TODO(hl): maybe rename to schema_name? string database_name = 1; bool create_if_not_exists = 2; } -message AddColumns { - repeated AddColumn add_columns = 1; -} +message AddColumns { repeated AddColumn add_columns = 1; } -message DropColumns { - repeated DropColumn drop_columns = 1; -} +message DropColumns { repeated DropColumn drop_columns = 1; } -message RenameTable { - string new_table_name = 1; -} +message RenameTable { string new_table_name = 1; } message AddColumn { ColumnDef column_def = 1; bool is_key = 2; } -message DropColumn { - string name = 1; -} +message DropColumn { string name = 1; } -message TableId { - uint32 id = 1; -} +message TableId { uint32 id = 1; } diff --git a/proto/greptime/v1/health.proto b/proto/greptime/v1/health.proto index ca21a0e..d9a2e05 100644 --- a/proto/greptime/v1/health.proto +++ b/proto/greptime/v1/health.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1; @@ -6,7 +20,6 @@ option java_package = "io.greptime.v1"; option java_outer_classname = "Health"; option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1"; - service HealthCheck { rpc HealthCheck(HealthCheckRequest) returns (HealthCheckResponse); } diff --git a/proto/greptime/v1/meta/cluster.proto b/proto/greptime/v1/meta/cluster.proto index 1cda16e..9007229 100644 --- a/proto/greptime/v1/meta/cluster.proto +++ b/proto/greptime/v1/meta/cluster.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1.meta; @@ -8,7 +22,7 @@ import "greptime/v1/meta/store.proto"; // Cluster service is used for communication between meta nodes. service Cluster { - // Batch get kvs by input keys from leader's in_memory kv store. + // Batch get kvs by input keys from leader's in_memory kv store. rpc BatchGet(BatchGetRequest) returns (BatchGetResponse); // Range get the kvs from leader's in_memory kv store. diff --git a/proto/greptime/v1/meta/common.proto b/proto/greptime/v1/meta/common.proto index 0c98406..fe005b5 100644 --- a/proto/greptime/v1/meta/common.proto +++ b/proto/greptime/v1/meta/common.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1.meta; diff --git a/proto/greptime/v1/meta/heartbeat.proto b/proto/greptime/v1/meta/heartbeat.proto index 60e870a..1c65621 100644 --- a/proto/greptime/v1/meta/heartbeat.proto +++ b/proto/greptime/v1/meta/heartbeat.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1.meta; @@ -8,7 +22,8 @@ import "greptime/v1/meta/common.proto"; service Heartbeat { // Heartbeat, there may be many contents of the heartbeat, such as: - // 1. Metadata to be registered to meta server and discoverable by other nodes. + // 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. rpc Heartbeat(stream HeartbeatRequest) returns (stream HeartbeatResponse) {} @@ -84,9 +99,7 @@ message HeartbeatResponse { MailboxMessage mailbox_message = 2; } -message AskLeaderRequest { - RequestHeader header = 1; -} +message AskLeaderRequest { RequestHeader header = 1; } message AskLeaderResponse { ResponseHeader header = 1; @@ -97,7 +110,8 @@ message AskLeaderResponse { message MailboxMessage { // The id is used to associate request and response. uint64 id = 1; - // The following information plays a bigger role in making messages traceable and facilitating debugging. + // The following information plays a bigger role in making messages traceable + // and facilitating debugging. string subject = 2; string from = 3; string to = 4; @@ -105,7 +119,5 @@ message MailboxMessage { int64 timestamp_millis = 5; // The message body. - oneof payload { - string json = 6; - } + oneof payload { string json = 6; } } diff --git a/proto/greptime/v1/meta/lock.proto b/proto/greptime/v1/meta/lock.proto index be143a3..dbd9261 100644 --- a/proto/greptime/v1/meta/lock.proto +++ b/proto/greptime/v1/meta/lock.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1.meta; @@ -7,8 +21,9 @@ option go_package = "github.com/GreptimeTeam/greptime-proto/go/greptime/v1/meta" import "greptime/v1/meta/common.proto"; service Lock { - // 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 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. rpc Lock(LockRequest) returns (LockResponse); // Unlock takes a key returned by Lock and releases the hold on lock. @@ -21,8 +36,8 @@ message LockRequest { // Name is the identifier for the distributed shared lock to be acquired. bytes name = 2; - // If the expiration time is exceeded and currently holds the lock, the lock is - // automatically released. + // If the expiration time is exceeded and currently holds the lock, the lock + // is automatically released. int64 expire_secs = 3; } @@ -40,6 +55,4 @@ message UnlockRequest { bytes key = 2; } -message UnlockResponse { - ResponseHeader header = 1; -} +message UnlockResponse { ResponseHeader header = 1; } diff --git a/proto/greptime/v1/meta/route.proto b/proto/greptime/v1/meta/route.proto index 7eaf3e2..441d8d6 100644 --- a/proto/greptime/v1/meta/route.proto +++ b/proto/greptime/v1/meta/route.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1.meta; @@ -11,7 +25,7 @@ service Router { // Fetch routing information for tables. The smallest unit is the complete // routing information(all regions) of a table. - // + // // ```text // table_1 // table_name @@ -50,7 +64,7 @@ message RouteRequest { message DeleteRequest { RequestHeader header = 1; - TableName table_name = 2; + TableName table_name = 2; } message RouteResponse { @@ -84,7 +98,7 @@ message Region { uint64 id = 1; string name = 2; Partition partition = 3; - + map attrs = 100; } @@ -96,6 +110,6 @@ message Partition { // This message is only for saving into store. message TableRouteValue { - repeated Peer peers = 1; + repeated Peer peers = 1; TableRoute table_route = 2; } diff --git a/proto/greptime/v1/meta/store.proto b/proto/greptime/v1/meta/store.proto index c17478c..34832df 100644 --- a/proto/greptime/v1/meta/store.proto +++ b/proto/greptime/v1/meta/store.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1.meta; @@ -56,7 +70,7 @@ message RangeRequest { message RangeResponse { ResponseHeader header = 1; - + // kvs is the list of key-value pairs matched by the range request. repeated KeyValue kvs = 2; // more indicates if there are more keys to return in the requested range. @@ -130,7 +144,6 @@ message BatchDeleteResponse { repeated KeyValue prev_kvs = 2; } - message CompareAndPutRequest { RequestHeader header = 1; @@ -140,7 +153,7 @@ message CompareAndPutRequest { bytes expect = 3; // value is the value, in bytes, to associate with the key in the // key-value store. - bytes value = 4; + bytes value = 4; } message CompareAndPutResponse { diff --git a/proto/greptime/v1/prom.proto b/proto/greptime/v1/prom.proto index 177fc91..14599c5 100644 --- a/proto/greptime/v1/prom.proto +++ b/proto/greptime/v1/prom.proto @@ -1,3 +1,17 @@ +// Copyright 2023 Greptime 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. + syntax = "proto3"; package greptime.v1;