/* ------------------------------------------------------------------- ** ** machi.proto: Protocol buffers for Machi ** ** Copyright (c) 2007-2015 Basho Technologies, Inc. All Rights Reserved. ** ** This file is provided to you under the Apache License, ** Version 2.0 (the "License"); you may not use this file ** except in compliance with the License. You may obtain ** a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, ** software distributed under the License is distributed on an ** "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY ** KIND, either express or implied. See the License for the ** specific language governing permissions and limitations ** under the License. ** ** ------------------------------------------------------------------- */ /* ** Revision: 0.1 */ // Java package specifiers option java_package = "com.basho.machi.protobuf"; option java_outer_classname = "MachiPB"; enum MpbStatusCode { OK = 0; ERROR = 1; } enum MpbErrorGeneral { BAD_ARG = 0; WEDGED = 1; BAD_CHECKSUM = 2; } // Must match with machi.hrl's values! enum MpbCSumType { CSUM_TAG_NONE = 0; CSUM_TAG_CLIENT_GEN = 1; CSUM_TAG_SERVER_GEN = 2; CSUM_TAG_SERVER_REGEN = 3; } // chunk_pos() type message MpbChunkPos { required uint32 offset = 1; required uint32 chunk_size = 2; required bytes file_name = 3; } // chunk_csum() type message MpbChunkCSum { required MpbCSumType type = 1; required bytes csum = 2; } // epoch_id() type message MpbEpochId { required uint32 epoch_num = 1; required MpbChunkCSum epoch_csum = 2; } // Error response - may be generated for any Req message MpbErrorResp { required bytes errmsg = 1; required uint32 errcode = 2; } // append_chunk() request message MpbAppendChunkReq { required string prefix = 1; optional bytes placement_key = 2; required bytes chunk = 3; optional uint32 chunk_extra = 4; } // append_chunk() response message MpbAppendChunkResp { required MpbStatusCode status = 1; optional MpbChunkPos chunk_pos = 2; optional MbpGeneralError = 3; } // Authentication request message MpbAuthReq { required bytes user = 1; required bytes password = 2; }