52 lines
1.1 KiB
Protocol Buffer
52 lines
1.1 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package data_service;
|
|
|
|
option go_package = "gitlab.michelsen.id/phillmichelsen/tessera/pkg/pb/data_service;data_service";
|
|
|
|
service DataServiceControl {
|
|
rpc StartStream(StartStreamRequest) returns (StartStreamResponse);
|
|
rpc StopStream(StopStreamRequest) returns (StopStreamResponse);
|
|
rpc ConfigureStream(ConfigureStreamRequest) returns (ConfigureStreamResponse);
|
|
}
|
|
|
|
service DataServiceStreaming {
|
|
rpc ConnectStream(ConnectStreamRequest) returns (stream Message);
|
|
}
|
|
|
|
// Domain Models
|
|
message Identifier {
|
|
string provider = 1; // e.g., "binance"
|
|
string subject = 2; // e.g., "BTCUSDT"
|
|
}
|
|
|
|
message Message {
|
|
Identifier identifier = 1;
|
|
string payload = 2; // JSON-encoded data
|
|
}
|
|
|
|
// Control Requests and Responses
|
|
message StartStreamRequest {}
|
|
|
|
message StartStreamResponse {
|
|
string stream_uuid = 1;
|
|
}
|
|
|
|
message ConfigureStreamRequest {
|
|
string stream_uuid = 1;
|
|
repeated Identifier identifiers = 2;
|
|
}
|
|
|
|
message ConfigureStreamResponse {}
|
|
|
|
message StopStreamRequest {
|
|
string stream_uuid = 1;
|
|
}
|
|
|
|
message StopStreamResponse {}
|
|
|
|
// Stream Requests and Responses
|
|
message ConnectStreamRequest {
|
|
string stream_uuid = 1;
|
|
}
|