Skip to content

Commit 7397d60

Browse files
committed
feat: add raccoon proto
1 parent 528fc46 commit 7397d60

4 files changed

Lines changed: 69 additions & 0 deletions

File tree

buf.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: v1beta1
2+
build:
3+
roots:
4+
- ./src
5+
breaking:
6+
use:
7+
- WIRE
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
syntax = "proto3";
2+
3+
package odpf.proton.raccoon;
4+
5+
option java_multiple_files = true;
6+
option java_package = "io.odpf.proton.raccoon";
7+
option java_outer_classname = "EventProto";
8+
9+
message Event {
10+
// Data/byteArray of the serialised product proto.
11+
bytes eventBytes = 1;
12+
/* This is the protoMessageName which the protoc provides with each compiled proto.
13+
This type is used by raccoon to distribute events to respective Kafka topics.
14+
*/
15+
string type = 2;
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
syntax = "proto3";
2+
3+
package odpf.proton.raccoon;
4+
5+
option java_multiple_files = true;
6+
option java_package = "io.odpf.proton.raccoon";
7+
option java_outer_classname = "EventRequestProto";
8+
9+
import "odpf/proton/raccoon/Event.proto";
10+
import "google/protobuf/timestamp.proto";
11+
12+
message EventRequest {
13+
string req_guid = 1;
14+
google.protobuf.Timestamp sent_time = 2;
15+
repeated Event events = 3;
16+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
syntax = "proto3";
2+
3+
package odpf.proton.raccoon;
4+
5+
option java_multiple_files = true;
6+
option java_package = "io.odpf.proton.raccoon";
7+
option java_outer_classname = "EventResponseProto";
8+
9+
message EventResponse {
10+
Status status = 1;
11+
Code code = 2;
12+
int64 sent_time = 3;
13+
string reason = 4;
14+
map<string, string> data = 5;
15+
}
16+
17+
enum Status {
18+
UNKNOWN_STATUS = 0;
19+
SUCCESS = 1;
20+
ERROR = 2;
21+
}
22+
23+
enum Code {
24+
UNKNOWN_CODE = 0;
25+
OK = 1;
26+
BAD_REQUEST = 2;
27+
INTERNAL_ERROR = 3;
28+
MAX_CONNECTION_LIMIT_REACHED = 4;
29+
MAX_USER_LIMIT_REACHED = 5;
30+
}

0 commit comments

Comments
 (0)