Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
remove more dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
erin committed Oct 19, 2012
1 parent 447c2b6 commit 3de2380
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 1 deletion.
1 change: 0 additions & 1 deletion montage-client.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Library
protocol-buffers >= 2.0.11,
protocol-buffers-descriptor >= 2.0.11,
stats-web,
montage,
safe

Extensions: OverloadedStrings,DeriveDataTypeable
Expand Down
104 changes: 104 additions & 0 deletions montage-client.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
enum MontageWireMessages {
MONTAGE_GET = 1;
MONTAGE_GET_REFERENCE = 2;
MONTAGE_GET_RESPONSE = 3;
MONTAGE_COMMAND = 4;
MONTAGE_COMMAND_RESPONSE = 5;
MONTAGE_PUT = 6;
MONTAGE_PUT_RESPONSE = 7;
MONTAGE_GET_MANY = 8;
DEPRICATED_MONTAGE_SET_REFERENCE = 9;
MONTAGE_PUT_MANY = 10;
MONTAGE_PUT_MANY_RESPONSE = 11;
MONTAGE_ERROR = 12;
MONTAGE_DELETE = 13;
MONTAGE_DELETE_RESPONSE = 14;
}

message MontageSubrequestSpec {
required bytes sub_spec = 1;
optional bytes params = 2;
}

message MontageGet {
required bytes bucket = 1;
required bytes key = 2;
optional MontageSubrequestSpec sub = 3;
}

message MontageGetMany {
/* note: will not execute subrequests!
master document will be None on
MontageGetResponse */
repeated MontageGet gets = 1;
}

message MontageGetReference {
required bytes bucket = 1;
required bytes key = 2;
repeated bytes target_buckets = 3;
}

enum MontageGetStatus {
EXISTS = 1;
MISSING = 2;
ERROR = 3;
}

message MontageObject {
optional bytes vclock = 1;
required bytes bucket = 2;
required bytes key = 3;
required bytes data = 4;
optional uint32 fetch_resolutions = 5; // informative
}

message MontageGetResponse {
repeated MontageGetStatus status = 1;
optional MontageObject master = 2; // optional b/c missing
repeated MontageObject subs = 3;
}

message MontageCommand {
required string command = 1;
optional bytes argument = 2;
}

message MontageCommandResponse {
required string status = 1;
optional bytes value = 2;
}

message MontagePut {
required MontageObject object = 1;
}

message MontagePutResponse {
required bool modified = 1;
required MontageObject object = 2; /* with siblings set */
}

message MontagePutMany {
repeated MontageObject objects = 1;
}

message MontagePutManyResponse {
repeated MontagePutResponse objects = 1;
}

message MontageDelete {
required bytes bucket = 1;
required bytes key = 2;
}

message MontageDeleteResponse {}

message MontageError {
required string error = 1;
}

message MontageEnvelope {
required MontageWireMessages mtype = 1;
required bytes msg = 2;
optional bytes msgid = 3;
}

0 comments on commit 3de2380

Please sign in to comment.