diff options
| author | Chris Lu <chris.lu@gmail.com> | 2014-04-21 02:11:10 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2014-04-21 02:11:10 -0700 |
| commit | 1818a2a2da412710f57d58f0228009f782b760af (patch) | |
| tree | e51f2e816dabcc7ac1ea42118bc9c74469367910 /go/proto | |
| parent | 637469e656c09d6e8d682e90ed0497f64e892f29 (diff) | |
| download | seaweedfs-1818a2a2da412710f57d58f0228009f782b760af.tar.xz seaweedfs-1818a2a2da412710f57d58f0228009f782b760af.zip | |
Change to protocol buffer for volume-join-masster message
Reduced size to about 1/5 of the previous json format message
Diffstat (limited to 'go/proto')
| -rw-r--r-- | go/proto/Makefile | 4 | ||||
| -rw-r--r-- | go/proto/system_message.proto | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/go/proto/Makefile b/go/proto/Makefile new file mode 100644 index 000000000..73af851dd --- /dev/null +++ b/go/proto/Makefile @@ -0,0 +1,4 @@ +TARG=../operation + +all: + protoc --go_out=$(TARG) system_message.proto diff --git a/go/proto/system_message.proto b/go/proto/system_message.proto new file mode 100644 index 000000000..15574ad56 --- /dev/null +++ b/go/proto/system_message.proto @@ -0,0 +1,25 @@ +package operation; + +message VolumeInformationMessage { + required uint32 id = 1; + required uint64 size = 2; + optional string collection = 3; + required uint64 file_count = 4; + required uint64 delete_count = 5; + required uint64 deleted_byte_count = 6; + optional bool read_only = 7; + required uint32 replica_placement = 8; + optional uint32 version = 9 [default=2]; +} + +message JoinMessage { + optional bool is_init = 1; + required string ip = 2; + required uint32 port = 3; + optional string public_url = 4; + required uint32 max_volume_count = 5; + required uint64 max_file_key = 6; + optional string data_center = 7; + optional string rack = 8; + repeated VolumeInformationMessage volumes = 9; +} |
