chore: add license header (#35)
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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<string, string> 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;
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user