Skip to content

Commit

Permalink
commit dep files
Browse files Browse the repository at this point in the history
  • Loading branch information
baotiao committed Feb 5, 2015
1 parent aa2b13d commit 1840557
Show file tree
Hide file tree
Showing 151 changed files with 60,400 additions and 0 deletions.
356 changes: 356 additions & 0 deletions bada_sdk.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@

message SdkInvalidOperation {
required int32 opcode = 1;
required int32 what = 2;
required bytes why = 3;
}

message SdkSet {
required int32 opcode = 1;
required bytes table = 2;
required bytes key = 3;
required bytes value = 4;
optional int32 writesrc = 5 [default = 0];
}

message SdkSetRet {
required int32 opcode = 1;
required bool status = 2;
optional string master = 3;
}

message SdkCas {
required int32 opcode = 1;
required bytes table = 2;
required bytes key = 3;
required bytes value = 4;
required int32 version = 5;
optional int32 writesrc = 6 [default = 0];
}

message SdkCasRet {
required int32 opcode = 1;
required bool status = 2;
optional string master = 3;
}

message SdkGet {
required int32 opcode = 1;
required bytes table = 2;
required bytes key = 3;
}

message SdkGetRet {
required int32 opcode = 1;
required bytes value = 2;
optional string master = 3;
}

message SdkGetV {
required int32 opcode = 1;
required bytes table = 2;
required bytes key = 3;
}

message SdkGetVRet {
required int32 opcode = 1;
required bytes value = 2;
required int32 version = 3;
optional string master = 4;
}

message SdkDelete {
required int32 opcode = 1;
required bytes table = 2;
required bytes key = 3;
optional int32 writesrc = 4 [default = 0];
}

message SdkDeleteRet {
required int32 opcode = 1;
required bool status = 2;
optional string master = 3;
}

message SdkPing {
required int32 opcode = 1;
}

message SdkPingRet {
required int32 opcode = 1;
required bool status = 2;
}

message SdkGetIfAll {
required int32 opcode = 1;
required bytes table = 2;
required bytes key = 3;
required bool Strict = 4;
}

message SdkGetIfAllRet {
required int32 opcode = 1;
required bytes value = 2;
required int32 version = 3;
optional string master = 4;
}

message SdkMGet {
required int32 opcode = 1;
required bytes table = 2;
repeated bytes key = 3;
}

message SdkMGetRet {
required int32 opcode = 1;

message KeyValue {
required bytes key = 1;
required bytes value = 2;
required int32 status = 3;
}

repeated KeyValue rets = 2;
optional string master = 3;
}

message GetMetadata4SDK2 {
required int32 cmd = 1;
required string table = 2;
}

message Rint32 {
required int32 id = 1;
}

message GetMetadata4SDK3 {
required int32 cmd = 1;
message NPs {
required string host = 1;
required int32 port = 2;
repeated Rint32 partitions = 3;
}
repeated NPs nps = 2;
required int32 pcnt = 3;
}

message GetPrimary4SDK2 {
required int32 cmd = 1;
required string table = 2;
required int32 partition = 3;
}

message GetPrimary4SDK3 {
required int32 cmd = 1;
required string host = 2;
required int32 port = 3;
}


message SdkHGet {
required int32 opcode = 1;
required bytes table = 2;
required bytes hname = 3;
required bytes key = 4;
}

message SdkHGetRet {
required int32 opcode = 1;
required bytes value = 2;
}

message SdkHPut {
required int32 opcode = 1;
required bytes table = 2;
required bytes hname = 3;
required bytes key = 4;
required bytes value = 5;
optional int32 writesrc = 6 [default = 0];
}

message SdkHPutRet {
required int32 opcode = 1;
required bool status = 2;
}

message SdkHDelete {
required int32 opcode = 1;
required bytes table = 2;
required bytes hname = 3;
required bytes key = 4;
optional int32 writesrc = 5 [default = 0];
}

message SdkHDeleteRet {
required int32 opcode = 1;
required bool status = 2;
}

message SdkHGetAllKeysByName {
required int32 opcode = 1;
required bytes table = 2;
required bytes hname = 3;
}

message SdkHGetAllKeysByNameRet {
required int32 opcode = 1;
repeated bytes keys = 2;
}


message SdkHGetAllKVsByName {
required int32 opcode = 1;
required bytes table = 2;
required bytes hname = 3;
}


message SdkHGetAllKVsByNameRet {
required int32 opcode = 1;
message HKeyValue {
required bytes key = 1;
required bytes value = 2;
}

repeated HKeyValue rets = 2;
}

message SdkHMput {
required int32 opcode = 1;
required bytes table = 2;
required bytes hname = 3;

message HKeyValue {
required bytes key = 1;
required bytes value = 2;
}

repeated HKeyValue kvs = 4;
optional int32 writesrc = 5 [default = 0];
}

message SdkHMputRet {
required int32 opcode = 1;

message HKeyRetval {
required bytes key = 1;
required int32 retval = 2;
}

repeated HKeyRetval krvs = 2;
}

message SdkHMget {
required int32 opcode = 1;
required bytes table = 2;
required bytes hname = 3;
repeated bytes keys = 4;
}

message SdkHMgetRet {
required int32 opcode = 1;

message HKeyValue {
required bytes key = 1;
required bytes value = 2;
required int32 retval = 3;
}

repeated HKeyValue kvs = 2;
}

message SdkSetWithTTL {
required int32 opcode = 1;
required bytes table = 2;
required bytes key = 3;
required bytes value = 4;
required int32 ttl = 5;
optional int32 writesrc = 6 [default = 0];
}

message SdkSetWithTTLRet {
required int32 opcode = 1;
required bool status = 2;
optional string master = 3;
}

message SdkLSize{
required int32 opcode = 1;
required bytes table = 2;
required bytes name = 3;
}

message SdkLSizeRet {
required int32 opcode = 1;
required uint64 size_r = 2;
}

message SdkLGet {
required int32 opcode = 1;
required bytes table = 2;
required bytes name = 3;
required int32 frontorback = 4;
}

message SdkLGetRet {
required int32 opcode = 1;
required bytes value = 2;
}

message SdkLPut {
required int32 opcode = 1;
required bytes table = 2;
required bytes name = 3;
required bytes value = 4;
required int32 frontorback = 5;
optional int32 writesrc = 6 [default = 0];
}

message SdkLPutRet {
required int32 opcode = 1;
required bool status = 2;
}

message SdkLPop{
required int32 opcode = 1;
required bytes table = 2;
required bytes name = 3;
required int32 frontorback = 4;
optional int32 writesrc = 5 [default = 0];
}

message SdkLPopRet {
required int32 opcode = 1;
required bytes value = 2;
}

message SdkLIndex {
required int32 opcode = 1;
required bytes table = 2;
required bytes name = 3;
required uint64 index = 4;
required int32 frontorback = 5;
}

message SdkLIndexRet {
required int32 opcode = 1;
required bytes value = 2;
}

message SdkLRange {
required int32 opcode = 1;
required bytes table = 2;
required bytes name = 3;
required uint64 from = 4;
required uint64 to = 5;
required int32 frontorback = 6;
}

message SdkLRangeRet {
required int32 opcode = 1;
repeated bytes value = 2;
}




Loading

0 comments on commit 1840557

Please sign in to comment.