-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontext.proto
More file actions
119 lines (103 loc) · 2.82 KB
/
Copy pathcontext.proto
File metadata and controls
119 lines (103 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
syntax = "proto3";
package context;
option go_package = ".;pf";
import "google/protobuf/empty.proto";
service ContextService {
rpc publish(PulsarMessage) returns (SendMessageId) {}
rpc currentRecord(MessageId) returns (Record) {}
rpc recordMetrics(MetricData) returns (google.protobuf.Empty) {}
rpc seek(Partition) returns (google.protobuf.Empty) {}
rpc pause(Partition) returns (google.protobuf.Empty) {}
rpc resume(Partition) returns (google.protobuf.Empty) {}
rpc getState(StateKey) returns (StateResult) {}
rpc putState(StateKeyValue) returns (google.protobuf.Empty) {}
rpc deleteState(StateKey) returns (google.protobuf.Empty) {}
rpc getCounter(StateKey) returns (Counter) {}
rpc incrCounter(IncrStateKey) returns (google.protobuf.Empty) {}
}
message SendMessageId {
int64 ledgerId = 1;
int64 entryId = 2;
int32 batchIndex = 3;
int32 partitionIndex = 4;
}
message StateKey {
string key = 1;
}
message StateKeyValue {
string key = 1;
bytes value = 2;
}
message StateResult {
bytes value = 1;
}
message IncrStateKey {
string key = 1;
int64 amount = 2;
}
message Counter {
int64 value = 1;
}
message Request {
bytes payload = 1;
}
message MessageId {
string id = 1;
}
message PublishSchema {
string schemaType = 1;
string name = 2;
bytes schemaData = 3;
map<string, string> properties = 4;
string subject = 5;
}
message PulsarMessage {
string topic = 1;
bytes payload = 2;
string messageId = 3;
string properties = 4;
string partitionKey = 5;
string sequenceId = 6;
string replicationClusters = 7;
bool disableReplication = 8;
int32 eventTimestamp = 9;
int32 deliverAt = 10;
int32 deliverAfter = 11;
PublishSchema schema = 12;
}
message Record {
bytes payload = 1;
string messageId = 2;
string properties = 3;
string key = 4;
string partitionId = 5;
string topicName = 6;
int64 eventTimestamp = 7;
}
message MetricData {
string metricName = 1;
double value = 2;
}
message Partition {
string topicName = 1;
int32 partitionIndex = 2;
bytes messageId = 3;
}