-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from strangemonad/shawn/protobuf
Shawn/protobuf
- Loading branch information
Showing
4 changed files
with
1,339 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
all: | ||
protoc --go_out=. *.proto | ||
|
||
clean: | ||
rm *.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Cockroach Protobuffer API | ||
|
||
This defines the low-level key-value API | ||
|
||
## Hacking | ||
|
||
The Go build tools don't support code generation very well. The approach taken here is to commit the Go generated sources along side the .proto files. This is modeled after https://github.com/golang/groupcache/blob/master/groupcachepb/groupcache.pb.go by @bradfitz | ||
|
||
To change the API, update the proto file, run make in this directory, commit both the proto and go files. | ||
|
||
Other references to Go code generation: | ||
* http://jteeuwen.nl/code/go/automatic_code_generation.html | ||
* https://plus.google.com/u/0/105521491106709880714/posts/bnUmdCGgJKD |
Oops, something went wrong.