mirror of https://github.com/dtm-labs/dtm.git
csharpjavadistributed-transactionsdtmgogolangmicroservicenodejsphpdatabasesagaseatatcctransactiontransactionsxapythondistributed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
80 lines
2.2 KiB
80 lines
2.2 KiB
syntax = "proto3";
|
|
|
|
option go_package = "./dtmgpb";
|
|
import "google/protobuf/empty.proto";
|
|
|
|
package dtmgimp;
|
|
|
|
// The dtm service definition.
|
|
service Dtm {
|
|
rpc NewGid(google.protobuf.Empty) returns (DtmGidReply) {}
|
|
rpc Submit(DtmRequest) returns (google.protobuf.Empty) {}
|
|
rpc Prepare(DtmRequest) returns (google.protobuf.Empty) {}
|
|
rpc Abort(DtmRequest) returns (google.protobuf.Empty) {}
|
|
rpc RegisterBranch(DtmBranchRequest) returns (google.protobuf.Empty) {}
|
|
rpc PrepareWorkflow(DtmRequest) returns (DtmProgressesReply) {}
|
|
rpc Subscribe(DtmTopicRequest) returns (google.protobuf.Empty){}
|
|
rpc Unsubscribe(DtmTopicRequest) returns (google.protobuf.Empty){}
|
|
rpc DeleteTopic(DtmTopicRequest) returns (google.protobuf.Empty){}
|
|
}
|
|
|
|
message DtmTransOptions {
|
|
bool WaitResult = 1;
|
|
int64 TimeoutToFail = 2;
|
|
int64 RetryInterval = 3;
|
|
// repeated string PassthroughHeaders = 4; // depreceated
|
|
map<string, string> BranchHeaders = 5;
|
|
int64 RequestTimeout = 6;
|
|
int64 RetryLimit = 7;
|
|
}
|
|
|
|
// DtmRequest request sent to dtm server
|
|
message DtmRequest {
|
|
string Gid = 1;
|
|
string TransType = 2;
|
|
DtmTransOptions TransOptions = 3;
|
|
string CustomedData = 4;
|
|
repeated bytes BinPayloads = 5; // for Msg/Saga/Workflow branch payloads
|
|
string QueryPrepared = 6; // for Msg
|
|
string Steps = 7;
|
|
map<string, string> ReqExtra = 8;
|
|
string RollbackReason = 9;
|
|
}
|
|
|
|
message DtmGidReply {
|
|
string Gid = 1;
|
|
}
|
|
|
|
message DtmBranchRequest {
|
|
string Gid = 1;
|
|
string TransType = 2;
|
|
string BranchID = 3;
|
|
string Op = 4;
|
|
map<string, string> Data = 5;
|
|
bytes BusiPayload = 6;
|
|
}
|
|
|
|
message DtmProgressesReply {
|
|
DtmTransaction Transaction = 1 [json_name="transaction"];
|
|
repeated DtmProgress Progresses = 2 [json_name="progresses"];
|
|
}
|
|
|
|
message DtmTransaction {
|
|
string Gid = 1 [json_name="gid"];
|
|
string Status = 2 [json_name="status"];
|
|
string RollbackReason = 3 [json_name="rollback_reason"];
|
|
string Result = 4 [json_name="result"];
|
|
}
|
|
|
|
message DtmProgress {
|
|
string Status = 1 [json_name="status"];
|
|
bytes BinData = 2 [json_name="bin_data"];
|
|
string BranchID = 3 [json_name="branch_id"];
|
|
string Op = 4 [json_name="op"];
|
|
}
|
|
|
|
message DtmTopicRequest {
|
|
string Topic = 1;
|
|
string URL = 2;
|
|
string Remark = 3;
|
|
}
|