Skip to content

Commit

Permalink
Merge pull request elastic#358 from Ben-Aldrich/census
Browse files Browse the repository at this point in the history
add new protofiles for request reply census
  • Loading branch information
Ben Aldrich committed Jun 22, 2015
2 parents b8d05dc + a190926 commit 7044bcb
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
25 changes: 25 additions & 0 deletions protofiles/heartthrob/reply.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package heartthrob;

option java_package = "com.logrhythm.nm.message.heartthrob";
option java_outer_classname = "CensusReplyMsg";

message reply {
optional Census census = 1;
optional string failure = 100;
message Census {
enum Status {
RED = 0;
YELLOW = 1;
GREEN = 2;
}
enum Platform {
LINUX = 0;
WINDOWS = 1;
}
optional Status status = 1;
optional string host = 2;
optional Platform platform = 3;
optional string notices = 4;
}
}

12 changes: 12 additions & 0 deletions protofiles/heartthrob/request.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package heartthrob;

option java_package = "com.logrhythm.nm.message.heartthrob";
option java_outer_classname = "RequestMsg";

message Request {
enum Type {
INVALID = 0;
CENSUS = 1;
}
optional Type request = 1;
}
9 changes: 5 additions & 4 deletions scripts/buildProtoFilesGo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ fi

(cd "$protoFileDir"; "$scriptsDir"/rewriteProto/rewriteProto . $goSrc/)

( cd $goSrc; protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc:/$goSrc/clipboard/ --gogo_out=$GOPATH/src/ "$goSrc"/*.proto )
( cd "$goSrc"/clipboard; protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc:$goSrc/clipboard/ --gogo_out=$GOPATH/src/ "$goSrc"/clipboard/*.proto)
rm "$goSrc"/*.proto
rm "$goSrc"/clipboard/*.proto
( cd $goSrc; protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc --gogo_out=$GOPATH/src/ $goSrc/*.proto )
#( cd "$goSrc"/clipboard; protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc:$goSrc/clipboard/ --gogo_out=$GOPATH/src/ "$goSrc"/clipboard/*.proto)
( cd "$goSrc"/clipboard; protoc -I="$GOPATH"/src/:/usr/local/include:/usr/include:$goSrc:$goSrc/clipboard/ --gogo_out=$GOPATH/src/ "$goSrc"/heartthrob/*.proto)
rm "$goSrc"/*.proto || true
rm "$goSrc"/clipboard/*.proto || true
1 change: 1 addition & 0 deletions scripts/rewriteProto/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ text: |
option (gogoproto.unmarshaler_all) = true;
exclude:
- RuleConf
- Rule
- DpiMsgLRproto
- Applications
- BaseConfMsg
Expand Down

0 comments on commit 7044bcb

Please sign in to comment.