v3lock.pb.go 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179
  1. // Code generated by protoc-gen-gogo. DO NOT EDIT.
  2. // source: v3lock.proto
  3. package v3lockpb
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. io "io"
  8. math "math"
  9. math_bits "math/bits"
  10. etcdserverpb "github.com/coreos/etcd/etcdserver/etcdserverpb"
  11. _ "github.com/gogo/protobuf/gogoproto"
  12. proto "github.com/golang/protobuf/proto"
  13. _ "google.golang.org/genproto/googleapis/api/annotations"
  14. grpc "google.golang.org/grpc"
  15. codes "google.golang.org/grpc/codes"
  16. status "google.golang.org/grpc/status"
  17. )
  18. // Reference imports to suppress errors if they are not otherwise used.
  19. var _ = proto.Marshal
  20. var _ = fmt.Errorf
  21. var _ = math.Inf
  22. // This is a compile-time assertion to ensure that this generated file
  23. // is compatible with the proto package it is being compiled against.
  24. // A compilation error at this line likely means your copy of the
  25. // proto package needs to be updated.
  26. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  27. type LockRequest struct {
  28. // name is the identifier for the distributed shared lock to be acquired.
  29. Name []byte `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  30. // lease is the ID of the lease that will be attached to ownership of the
  31. // lock. If the lease expires or is revoked and currently holds the lock,
  32. // the lock is automatically released. Calls to Lock with the same lease will
  33. // be treated as a single acquistion; locking twice with the same lease is a
  34. // no-op.
  35. Lease int64 `protobuf:"varint,2,opt,name=lease,proto3" json:"lease,omitempty"`
  36. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  37. XXX_unrecognized []byte `json:"-"`
  38. XXX_sizecache int32 `json:"-"`
  39. }
  40. func (m *LockRequest) Reset() { *m = LockRequest{} }
  41. func (m *LockRequest) String() string { return proto.CompactTextString(m) }
  42. func (*LockRequest) ProtoMessage() {}
  43. func (*LockRequest) Descriptor() ([]byte, []int) {
  44. return fileDescriptor_52389b3e2f253201, []int{0}
  45. }
  46. func (m *LockRequest) XXX_Unmarshal(b []byte) error {
  47. return m.Unmarshal(b)
  48. }
  49. func (m *LockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  50. if deterministic {
  51. return xxx_messageInfo_LockRequest.Marshal(b, m, deterministic)
  52. } else {
  53. b = b[:cap(b)]
  54. n, err := m.MarshalToSizedBuffer(b)
  55. if err != nil {
  56. return nil, err
  57. }
  58. return b[:n], nil
  59. }
  60. }
  61. func (m *LockRequest) XXX_Merge(src proto.Message) {
  62. xxx_messageInfo_LockRequest.Merge(m, src)
  63. }
  64. func (m *LockRequest) XXX_Size() int {
  65. return m.Size()
  66. }
  67. func (m *LockRequest) XXX_DiscardUnknown() {
  68. xxx_messageInfo_LockRequest.DiscardUnknown(m)
  69. }
  70. var xxx_messageInfo_LockRequest proto.InternalMessageInfo
  71. func (m *LockRequest) GetName() []byte {
  72. if m != nil {
  73. return m.Name
  74. }
  75. return nil
  76. }
  77. func (m *LockRequest) GetLease() int64 {
  78. if m != nil {
  79. return m.Lease
  80. }
  81. return 0
  82. }
  83. type LockResponse struct {
  84. Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
  85. // key is a key that will exist on etcd for the duration that the Lock caller
  86. // owns the lock. Users should not modify this key or the lock may exhibit
  87. // undefined behavior.
  88. Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
  89. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  90. XXX_unrecognized []byte `json:"-"`
  91. XXX_sizecache int32 `json:"-"`
  92. }
  93. func (m *LockResponse) Reset() { *m = LockResponse{} }
  94. func (m *LockResponse) String() string { return proto.CompactTextString(m) }
  95. func (*LockResponse) ProtoMessage() {}
  96. func (*LockResponse) Descriptor() ([]byte, []int) {
  97. return fileDescriptor_52389b3e2f253201, []int{1}
  98. }
  99. func (m *LockResponse) XXX_Unmarshal(b []byte) error {
  100. return m.Unmarshal(b)
  101. }
  102. func (m *LockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  103. if deterministic {
  104. return xxx_messageInfo_LockResponse.Marshal(b, m, deterministic)
  105. } else {
  106. b = b[:cap(b)]
  107. n, err := m.MarshalToSizedBuffer(b)
  108. if err != nil {
  109. return nil, err
  110. }
  111. return b[:n], nil
  112. }
  113. }
  114. func (m *LockResponse) XXX_Merge(src proto.Message) {
  115. xxx_messageInfo_LockResponse.Merge(m, src)
  116. }
  117. func (m *LockResponse) XXX_Size() int {
  118. return m.Size()
  119. }
  120. func (m *LockResponse) XXX_DiscardUnknown() {
  121. xxx_messageInfo_LockResponse.DiscardUnknown(m)
  122. }
  123. var xxx_messageInfo_LockResponse proto.InternalMessageInfo
  124. func (m *LockResponse) GetHeader() *etcdserverpb.ResponseHeader {
  125. if m != nil {
  126. return m.Header
  127. }
  128. return nil
  129. }
  130. func (m *LockResponse) GetKey() []byte {
  131. if m != nil {
  132. return m.Key
  133. }
  134. return nil
  135. }
  136. type UnlockRequest struct {
  137. // key is the lock ownership key granted by Lock.
  138. Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
  139. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  140. XXX_unrecognized []byte `json:"-"`
  141. XXX_sizecache int32 `json:"-"`
  142. }
  143. func (m *UnlockRequest) Reset() { *m = UnlockRequest{} }
  144. func (m *UnlockRequest) String() string { return proto.CompactTextString(m) }
  145. func (*UnlockRequest) ProtoMessage() {}
  146. func (*UnlockRequest) Descriptor() ([]byte, []int) {
  147. return fileDescriptor_52389b3e2f253201, []int{2}
  148. }
  149. func (m *UnlockRequest) XXX_Unmarshal(b []byte) error {
  150. return m.Unmarshal(b)
  151. }
  152. func (m *UnlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  153. if deterministic {
  154. return xxx_messageInfo_UnlockRequest.Marshal(b, m, deterministic)
  155. } else {
  156. b = b[:cap(b)]
  157. n, err := m.MarshalToSizedBuffer(b)
  158. if err != nil {
  159. return nil, err
  160. }
  161. return b[:n], nil
  162. }
  163. }
  164. func (m *UnlockRequest) XXX_Merge(src proto.Message) {
  165. xxx_messageInfo_UnlockRequest.Merge(m, src)
  166. }
  167. func (m *UnlockRequest) XXX_Size() int {
  168. return m.Size()
  169. }
  170. func (m *UnlockRequest) XXX_DiscardUnknown() {
  171. xxx_messageInfo_UnlockRequest.DiscardUnknown(m)
  172. }
  173. var xxx_messageInfo_UnlockRequest proto.InternalMessageInfo
  174. func (m *UnlockRequest) GetKey() []byte {
  175. if m != nil {
  176. return m.Key
  177. }
  178. return nil
  179. }
  180. type UnlockResponse struct {
  181. Header *etcdserverpb.ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
  182. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  183. XXX_unrecognized []byte `json:"-"`
  184. XXX_sizecache int32 `json:"-"`
  185. }
  186. func (m *UnlockResponse) Reset() { *m = UnlockResponse{} }
  187. func (m *UnlockResponse) String() string { return proto.CompactTextString(m) }
  188. func (*UnlockResponse) ProtoMessage() {}
  189. func (*UnlockResponse) Descriptor() ([]byte, []int) {
  190. return fileDescriptor_52389b3e2f253201, []int{3}
  191. }
  192. func (m *UnlockResponse) XXX_Unmarshal(b []byte) error {
  193. return m.Unmarshal(b)
  194. }
  195. func (m *UnlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  196. if deterministic {
  197. return xxx_messageInfo_UnlockResponse.Marshal(b, m, deterministic)
  198. } else {
  199. b = b[:cap(b)]
  200. n, err := m.MarshalToSizedBuffer(b)
  201. if err != nil {
  202. return nil, err
  203. }
  204. return b[:n], nil
  205. }
  206. }
  207. func (m *UnlockResponse) XXX_Merge(src proto.Message) {
  208. xxx_messageInfo_UnlockResponse.Merge(m, src)
  209. }
  210. func (m *UnlockResponse) XXX_Size() int {
  211. return m.Size()
  212. }
  213. func (m *UnlockResponse) XXX_DiscardUnknown() {
  214. xxx_messageInfo_UnlockResponse.DiscardUnknown(m)
  215. }
  216. var xxx_messageInfo_UnlockResponse proto.InternalMessageInfo
  217. func (m *UnlockResponse) GetHeader() *etcdserverpb.ResponseHeader {
  218. if m != nil {
  219. return m.Header
  220. }
  221. return nil
  222. }
  223. func init() {
  224. proto.RegisterType((*LockRequest)(nil), "v3lockpb.LockRequest")
  225. proto.RegisterType((*LockResponse)(nil), "v3lockpb.LockResponse")
  226. proto.RegisterType((*UnlockRequest)(nil), "v3lockpb.UnlockRequest")
  227. proto.RegisterType((*UnlockResponse)(nil), "v3lockpb.UnlockResponse")
  228. }
  229. func init() { proto.RegisterFile("v3lock.proto", fileDescriptor_52389b3e2f253201) }
  230. var fileDescriptor_52389b3e2f253201 = []byte{
  231. // 335 bytes of a gzipped FileDescriptorProto
  232. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x33, 0xce, 0xc9,
  233. 0x4f, 0xce, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf0, 0x0a, 0x92, 0xa4, 0x44,
  234. 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x82, 0xfa, 0x20, 0x16, 0x44, 0x5e, 0x4a, 0x2d, 0xb5, 0x24, 0x39,
  235. 0x45, 0x1f, 0x44, 0x14, 0xa7, 0x16, 0x95, 0xa5, 0x16, 0x21, 0x31, 0x0b, 0x92, 0xf4, 0x8b, 0x0a,
  236. 0x92, 0xa1, 0xea, 0x64, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x13, 0x0b, 0x32, 0xf5, 0x13,
  237. 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0x21, 0xb2, 0x4a, 0xe6, 0x5c, 0xdc,
  238. 0x3e, 0xf9, 0xc9, 0xd9, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x42, 0x5c, 0x2c, 0x79,
  239. 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x60, 0xb6, 0x90, 0x08, 0x17, 0x6b,
  240. 0x4e, 0x6a, 0x62, 0x71, 0xaa, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x73, 0x10, 0x84, 0xa3, 0x14, 0xc6,
  241. 0xc5, 0x03, 0xd1, 0x58, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x64, 0xc2, 0xc5, 0x96, 0x91, 0x9a,
  242. 0x98, 0x92, 0x5a, 0x04, 0xd6, 0xcb, 0x6d, 0x24, 0xa3, 0x87, 0xec, 0x1e, 0x3d, 0x98, 0x3a, 0x0f,
  243. 0xb0, 0x9a, 0x20, 0xa8, 0x5a, 0x21, 0x01, 0x2e, 0xe6, 0xec, 0xd4, 0x4a, 0xb0, 0xc9, 0x3c, 0x41,
  244. 0x20, 0xa6, 0x92, 0x22, 0x17, 0x6f, 0x68, 0x5e, 0x0e, 0x92, 0x93, 0xa0, 0x4a, 0x18, 0x11, 0x4a,
  245. 0xdc, 0xb8, 0xf8, 0x60, 0x4a, 0x28, 0xb1, 0xdc, 0x68, 0x07, 0x23, 0x17, 0x0b, 0xc8, 0x0f, 0x42,
  246. 0xc1, 0x50, 0x5a, 0x54, 0x0f, 0x16, 0xe6, 0x7a, 0x48, 0x81, 0x22, 0x25, 0x86, 0x2e, 0x0c, 0x31,
  247. 0x4d, 0x49, 0xa6, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0x62, 0x4a, 0x82, 0xfa, 0x65, 0xc6, 0x49, 0xa9,
  248. 0x25, 0x89, 0xfa, 0x20, 0x45, 0x60, 0xc2, 0x8a, 0x51, 0x4b, 0x28, 0x9a, 0x8b, 0x0d, 0xe2, 0x4a,
  249. 0x21, 0x71, 0x84, 0x7e, 0x14, 0xaf, 0x49, 0x49, 0x60, 0x4a, 0x40, 0x8d, 0x96, 0x03, 0x1b, 0x2d,
  250. 0xa1, 0x24, 0x8c, 0x62, 0x74, 0x69, 0x1e, 0xd4, 0x70, 0x27, 0x81, 0x13, 0x8f, 0xe4, 0x18, 0x2f,
  251. 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc6, 0x63, 0x39, 0x86, 0x24, 0x36, 0x70, 0x7c,
  252. 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x10, 0x82, 0x89, 0xf0, 0x45, 0x02, 0x00, 0x00,
  253. }
  254. // Reference imports to suppress errors if they are not otherwise used.
  255. var _ context.Context
  256. var _ grpc.ClientConn
  257. // This is a compile-time assertion to ensure that this generated file
  258. // is compatible with the grpc package it is being compiled against.
  259. const _ = grpc.SupportPackageIsVersion4
  260. // LockClient is the client API for Lock service.
  261. //
  262. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  263. type LockClient interface {
  264. // Lock acquires a distributed shared lock on a given named lock.
  265. // On success, it will return a unique key that exists so long as the
  266. // lock is held by the caller. This key can be used in conjunction with
  267. // transactions to safely ensure updates to etcd only occur while holding
  268. // lock ownership. The lock is held until Unlock is called on the key or the
  269. // lease associate with the owner expires.
  270. Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error)
  271. // Unlock takes a key returned by Lock and releases the hold on lock. The
  272. // next Lock caller waiting for the lock will then be woken up and given
  273. // ownership of the lock.
  274. Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error)
  275. }
  276. type lockClient struct {
  277. cc *grpc.ClientConn
  278. }
  279. func NewLockClient(cc *grpc.ClientConn) LockClient {
  280. return &lockClient{cc}
  281. }
  282. func (c *lockClient) Lock(ctx context.Context, in *LockRequest, opts ...grpc.CallOption) (*LockResponse, error) {
  283. out := new(LockResponse)
  284. err := c.cc.Invoke(ctx, "/v3lockpb.Lock/Lock", in, out, opts...)
  285. if err != nil {
  286. return nil, err
  287. }
  288. return out, nil
  289. }
  290. func (c *lockClient) Unlock(ctx context.Context, in *UnlockRequest, opts ...grpc.CallOption) (*UnlockResponse, error) {
  291. out := new(UnlockResponse)
  292. err := c.cc.Invoke(ctx, "/v3lockpb.Lock/Unlock", in, out, opts...)
  293. if err != nil {
  294. return nil, err
  295. }
  296. return out, nil
  297. }
  298. // LockServer is the server API for Lock service.
  299. type LockServer interface {
  300. // Lock acquires a distributed shared lock on a given named lock.
  301. // On success, it will return a unique key that exists so long as the
  302. // lock is held by the caller. This key can be used in conjunction with
  303. // transactions to safely ensure updates to etcd only occur while holding
  304. // lock ownership. The lock is held until Unlock is called on the key or the
  305. // lease associate with the owner expires.
  306. Lock(context.Context, *LockRequest) (*LockResponse, error)
  307. // Unlock takes a key returned by Lock and releases the hold on lock. The
  308. // next Lock caller waiting for the lock will then be woken up and given
  309. // ownership of the lock.
  310. Unlock(context.Context, *UnlockRequest) (*UnlockResponse, error)
  311. }
  312. // UnimplementedLockServer can be embedded to have forward compatible implementations.
  313. type UnimplementedLockServer struct {
  314. }
  315. func (*UnimplementedLockServer) Lock(ctx context.Context, req *LockRequest) (*LockResponse, error) {
  316. return nil, status.Errorf(codes.Unimplemented, "method Lock not implemented")
  317. }
  318. func (*UnimplementedLockServer) Unlock(ctx context.Context, req *UnlockRequest) (*UnlockResponse, error) {
  319. return nil, status.Errorf(codes.Unimplemented, "method Unlock not implemented")
  320. }
  321. func RegisterLockServer(s *grpc.Server, srv LockServer) {
  322. s.RegisterService(&_Lock_serviceDesc, srv)
  323. }
  324. func _Lock_Lock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  325. in := new(LockRequest)
  326. if err := dec(in); err != nil {
  327. return nil, err
  328. }
  329. if interceptor == nil {
  330. return srv.(LockServer).Lock(ctx, in)
  331. }
  332. info := &grpc.UnaryServerInfo{
  333. Server: srv,
  334. FullMethod: "/v3lockpb.Lock/Lock",
  335. }
  336. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  337. return srv.(LockServer).Lock(ctx, req.(*LockRequest))
  338. }
  339. return interceptor(ctx, in, info, handler)
  340. }
  341. func _Lock_Unlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  342. in := new(UnlockRequest)
  343. if err := dec(in); err != nil {
  344. return nil, err
  345. }
  346. if interceptor == nil {
  347. return srv.(LockServer).Unlock(ctx, in)
  348. }
  349. info := &grpc.UnaryServerInfo{
  350. Server: srv,
  351. FullMethod: "/v3lockpb.Lock/Unlock",
  352. }
  353. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  354. return srv.(LockServer).Unlock(ctx, req.(*UnlockRequest))
  355. }
  356. return interceptor(ctx, in, info, handler)
  357. }
  358. var _Lock_serviceDesc = grpc.ServiceDesc{
  359. ServiceName: "v3lockpb.Lock",
  360. HandlerType: (*LockServer)(nil),
  361. Methods: []grpc.MethodDesc{
  362. {
  363. MethodName: "Lock",
  364. Handler: _Lock_Lock_Handler,
  365. },
  366. {
  367. MethodName: "Unlock",
  368. Handler: _Lock_Unlock_Handler,
  369. },
  370. },
  371. Streams: []grpc.StreamDesc{},
  372. Metadata: "v3lock.proto",
  373. }
  374. func (m *LockRequest) Marshal() (dAtA []byte, err error) {
  375. size := m.Size()
  376. dAtA = make([]byte, size)
  377. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  378. if err != nil {
  379. return nil, err
  380. }
  381. return dAtA[:n], nil
  382. }
  383. func (m *LockRequest) MarshalTo(dAtA []byte) (int, error) {
  384. size := m.Size()
  385. return m.MarshalToSizedBuffer(dAtA[:size])
  386. }
  387. func (m *LockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  388. i := len(dAtA)
  389. _ = i
  390. var l int
  391. _ = l
  392. if m.XXX_unrecognized != nil {
  393. i -= len(m.XXX_unrecognized)
  394. copy(dAtA[i:], m.XXX_unrecognized)
  395. }
  396. if m.Lease != 0 {
  397. i = encodeVarintV3Lock(dAtA, i, uint64(m.Lease))
  398. i--
  399. dAtA[i] = 0x10
  400. }
  401. if len(m.Name) > 0 {
  402. i -= len(m.Name)
  403. copy(dAtA[i:], m.Name)
  404. i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Name)))
  405. i--
  406. dAtA[i] = 0xa
  407. }
  408. return len(dAtA) - i, nil
  409. }
  410. func (m *LockResponse) Marshal() (dAtA []byte, err error) {
  411. size := m.Size()
  412. dAtA = make([]byte, size)
  413. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  414. if err != nil {
  415. return nil, err
  416. }
  417. return dAtA[:n], nil
  418. }
  419. func (m *LockResponse) MarshalTo(dAtA []byte) (int, error) {
  420. size := m.Size()
  421. return m.MarshalToSizedBuffer(dAtA[:size])
  422. }
  423. func (m *LockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  424. i := len(dAtA)
  425. _ = i
  426. var l int
  427. _ = l
  428. if m.XXX_unrecognized != nil {
  429. i -= len(m.XXX_unrecognized)
  430. copy(dAtA[i:], m.XXX_unrecognized)
  431. }
  432. if len(m.Key) > 0 {
  433. i -= len(m.Key)
  434. copy(dAtA[i:], m.Key)
  435. i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key)))
  436. i--
  437. dAtA[i] = 0x12
  438. }
  439. if m.Header != nil {
  440. {
  441. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  442. if err != nil {
  443. return 0, err
  444. }
  445. i -= size
  446. i = encodeVarintV3Lock(dAtA, i, uint64(size))
  447. }
  448. i--
  449. dAtA[i] = 0xa
  450. }
  451. return len(dAtA) - i, nil
  452. }
  453. func (m *UnlockRequest) Marshal() (dAtA []byte, err error) {
  454. size := m.Size()
  455. dAtA = make([]byte, size)
  456. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  457. if err != nil {
  458. return nil, err
  459. }
  460. return dAtA[:n], nil
  461. }
  462. func (m *UnlockRequest) MarshalTo(dAtA []byte) (int, error) {
  463. size := m.Size()
  464. return m.MarshalToSizedBuffer(dAtA[:size])
  465. }
  466. func (m *UnlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  467. i := len(dAtA)
  468. _ = i
  469. var l int
  470. _ = l
  471. if m.XXX_unrecognized != nil {
  472. i -= len(m.XXX_unrecognized)
  473. copy(dAtA[i:], m.XXX_unrecognized)
  474. }
  475. if len(m.Key) > 0 {
  476. i -= len(m.Key)
  477. copy(dAtA[i:], m.Key)
  478. i = encodeVarintV3Lock(dAtA, i, uint64(len(m.Key)))
  479. i--
  480. dAtA[i] = 0xa
  481. }
  482. return len(dAtA) - i, nil
  483. }
  484. func (m *UnlockResponse) Marshal() (dAtA []byte, err error) {
  485. size := m.Size()
  486. dAtA = make([]byte, size)
  487. n, err := m.MarshalToSizedBuffer(dAtA[:size])
  488. if err != nil {
  489. return nil, err
  490. }
  491. return dAtA[:n], nil
  492. }
  493. func (m *UnlockResponse) MarshalTo(dAtA []byte) (int, error) {
  494. size := m.Size()
  495. return m.MarshalToSizedBuffer(dAtA[:size])
  496. }
  497. func (m *UnlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
  498. i := len(dAtA)
  499. _ = i
  500. var l int
  501. _ = l
  502. if m.XXX_unrecognized != nil {
  503. i -= len(m.XXX_unrecognized)
  504. copy(dAtA[i:], m.XXX_unrecognized)
  505. }
  506. if m.Header != nil {
  507. {
  508. size, err := m.Header.MarshalToSizedBuffer(dAtA[:i])
  509. if err != nil {
  510. return 0, err
  511. }
  512. i -= size
  513. i = encodeVarintV3Lock(dAtA, i, uint64(size))
  514. }
  515. i--
  516. dAtA[i] = 0xa
  517. }
  518. return len(dAtA) - i, nil
  519. }
  520. func encodeVarintV3Lock(dAtA []byte, offset int, v uint64) int {
  521. offset -= sovV3Lock(v)
  522. base := offset
  523. for v >= 1<<7 {
  524. dAtA[offset] = uint8(v&0x7f | 0x80)
  525. v >>= 7
  526. offset++
  527. }
  528. dAtA[offset] = uint8(v)
  529. return base
  530. }
  531. func (m *LockRequest) Size() (n int) {
  532. if m == nil {
  533. return 0
  534. }
  535. var l int
  536. _ = l
  537. l = len(m.Name)
  538. if l > 0 {
  539. n += 1 + l + sovV3Lock(uint64(l))
  540. }
  541. if m.Lease != 0 {
  542. n += 1 + sovV3Lock(uint64(m.Lease))
  543. }
  544. if m.XXX_unrecognized != nil {
  545. n += len(m.XXX_unrecognized)
  546. }
  547. return n
  548. }
  549. func (m *LockResponse) Size() (n int) {
  550. if m == nil {
  551. return 0
  552. }
  553. var l int
  554. _ = l
  555. if m.Header != nil {
  556. l = m.Header.Size()
  557. n += 1 + l + sovV3Lock(uint64(l))
  558. }
  559. l = len(m.Key)
  560. if l > 0 {
  561. n += 1 + l + sovV3Lock(uint64(l))
  562. }
  563. if m.XXX_unrecognized != nil {
  564. n += len(m.XXX_unrecognized)
  565. }
  566. return n
  567. }
  568. func (m *UnlockRequest) Size() (n int) {
  569. if m == nil {
  570. return 0
  571. }
  572. var l int
  573. _ = l
  574. l = len(m.Key)
  575. if l > 0 {
  576. n += 1 + l + sovV3Lock(uint64(l))
  577. }
  578. if m.XXX_unrecognized != nil {
  579. n += len(m.XXX_unrecognized)
  580. }
  581. return n
  582. }
  583. func (m *UnlockResponse) Size() (n int) {
  584. if m == nil {
  585. return 0
  586. }
  587. var l int
  588. _ = l
  589. if m.Header != nil {
  590. l = m.Header.Size()
  591. n += 1 + l + sovV3Lock(uint64(l))
  592. }
  593. if m.XXX_unrecognized != nil {
  594. n += len(m.XXX_unrecognized)
  595. }
  596. return n
  597. }
  598. func sovV3Lock(x uint64) (n int) {
  599. return (math_bits.Len64(x|1) + 6) / 7
  600. }
  601. func sozV3Lock(x uint64) (n int) {
  602. return sovV3Lock(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  603. }
  604. func (m *LockRequest) Unmarshal(dAtA []byte) error {
  605. l := len(dAtA)
  606. iNdEx := 0
  607. for iNdEx < l {
  608. preIndex := iNdEx
  609. var wire uint64
  610. for shift := uint(0); ; shift += 7 {
  611. if shift >= 64 {
  612. return ErrIntOverflowV3Lock
  613. }
  614. if iNdEx >= l {
  615. return io.ErrUnexpectedEOF
  616. }
  617. b := dAtA[iNdEx]
  618. iNdEx++
  619. wire |= uint64(b&0x7F) << shift
  620. if b < 0x80 {
  621. break
  622. }
  623. }
  624. fieldNum := int32(wire >> 3)
  625. wireType := int(wire & 0x7)
  626. if wireType == 4 {
  627. return fmt.Errorf("proto: LockRequest: wiretype end group for non-group")
  628. }
  629. if fieldNum <= 0 {
  630. return fmt.Errorf("proto: LockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  631. }
  632. switch fieldNum {
  633. case 1:
  634. if wireType != 2 {
  635. return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
  636. }
  637. var byteLen int
  638. for shift := uint(0); ; shift += 7 {
  639. if shift >= 64 {
  640. return ErrIntOverflowV3Lock
  641. }
  642. if iNdEx >= l {
  643. return io.ErrUnexpectedEOF
  644. }
  645. b := dAtA[iNdEx]
  646. iNdEx++
  647. byteLen |= int(b&0x7F) << shift
  648. if b < 0x80 {
  649. break
  650. }
  651. }
  652. if byteLen < 0 {
  653. return ErrInvalidLengthV3Lock
  654. }
  655. postIndex := iNdEx + byteLen
  656. if postIndex < 0 {
  657. return ErrInvalidLengthV3Lock
  658. }
  659. if postIndex > l {
  660. return io.ErrUnexpectedEOF
  661. }
  662. m.Name = append(m.Name[:0], dAtA[iNdEx:postIndex]...)
  663. if m.Name == nil {
  664. m.Name = []byte{}
  665. }
  666. iNdEx = postIndex
  667. case 2:
  668. if wireType != 0 {
  669. return fmt.Errorf("proto: wrong wireType = %d for field Lease", wireType)
  670. }
  671. m.Lease = 0
  672. for shift := uint(0); ; shift += 7 {
  673. if shift >= 64 {
  674. return ErrIntOverflowV3Lock
  675. }
  676. if iNdEx >= l {
  677. return io.ErrUnexpectedEOF
  678. }
  679. b := dAtA[iNdEx]
  680. iNdEx++
  681. m.Lease |= int64(b&0x7F) << shift
  682. if b < 0x80 {
  683. break
  684. }
  685. }
  686. default:
  687. iNdEx = preIndex
  688. skippy, err := skipV3Lock(dAtA[iNdEx:])
  689. if err != nil {
  690. return err
  691. }
  692. if skippy < 0 {
  693. return ErrInvalidLengthV3Lock
  694. }
  695. if (iNdEx + skippy) < 0 {
  696. return ErrInvalidLengthV3Lock
  697. }
  698. if (iNdEx + skippy) > l {
  699. return io.ErrUnexpectedEOF
  700. }
  701. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  702. iNdEx += skippy
  703. }
  704. }
  705. if iNdEx > l {
  706. return io.ErrUnexpectedEOF
  707. }
  708. return nil
  709. }
  710. func (m *LockResponse) Unmarshal(dAtA []byte) error {
  711. l := len(dAtA)
  712. iNdEx := 0
  713. for iNdEx < l {
  714. preIndex := iNdEx
  715. var wire uint64
  716. for shift := uint(0); ; shift += 7 {
  717. if shift >= 64 {
  718. return ErrIntOverflowV3Lock
  719. }
  720. if iNdEx >= l {
  721. return io.ErrUnexpectedEOF
  722. }
  723. b := dAtA[iNdEx]
  724. iNdEx++
  725. wire |= uint64(b&0x7F) << shift
  726. if b < 0x80 {
  727. break
  728. }
  729. }
  730. fieldNum := int32(wire >> 3)
  731. wireType := int(wire & 0x7)
  732. if wireType == 4 {
  733. return fmt.Errorf("proto: LockResponse: wiretype end group for non-group")
  734. }
  735. if fieldNum <= 0 {
  736. return fmt.Errorf("proto: LockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  737. }
  738. switch fieldNum {
  739. case 1:
  740. if wireType != 2 {
  741. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  742. }
  743. var msglen int
  744. for shift := uint(0); ; shift += 7 {
  745. if shift >= 64 {
  746. return ErrIntOverflowV3Lock
  747. }
  748. if iNdEx >= l {
  749. return io.ErrUnexpectedEOF
  750. }
  751. b := dAtA[iNdEx]
  752. iNdEx++
  753. msglen |= int(b&0x7F) << shift
  754. if b < 0x80 {
  755. break
  756. }
  757. }
  758. if msglen < 0 {
  759. return ErrInvalidLengthV3Lock
  760. }
  761. postIndex := iNdEx + msglen
  762. if postIndex < 0 {
  763. return ErrInvalidLengthV3Lock
  764. }
  765. if postIndex > l {
  766. return io.ErrUnexpectedEOF
  767. }
  768. if m.Header == nil {
  769. m.Header = &etcdserverpb.ResponseHeader{}
  770. }
  771. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  772. return err
  773. }
  774. iNdEx = postIndex
  775. case 2:
  776. if wireType != 2 {
  777. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  778. }
  779. var byteLen int
  780. for shift := uint(0); ; shift += 7 {
  781. if shift >= 64 {
  782. return ErrIntOverflowV3Lock
  783. }
  784. if iNdEx >= l {
  785. return io.ErrUnexpectedEOF
  786. }
  787. b := dAtA[iNdEx]
  788. iNdEx++
  789. byteLen |= int(b&0x7F) << shift
  790. if b < 0x80 {
  791. break
  792. }
  793. }
  794. if byteLen < 0 {
  795. return ErrInvalidLengthV3Lock
  796. }
  797. postIndex := iNdEx + byteLen
  798. if postIndex < 0 {
  799. return ErrInvalidLengthV3Lock
  800. }
  801. if postIndex > l {
  802. return io.ErrUnexpectedEOF
  803. }
  804. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  805. if m.Key == nil {
  806. m.Key = []byte{}
  807. }
  808. iNdEx = postIndex
  809. default:
  810. iNdEx = preIndex
  811. skippy, err := skipV3Lock(dAtA[iNdEx:])
  812. if err != nil {
  813. return err
  814. }
  815. if skippy < 0 {
  816. return ErrInvalidLengthV3Lock
  817. }
  818. if (iNdEx + skippy) < 0 {
  819. return ErrInvalidLengthV3Lock
  820. }
  821. if (iNdEx + skippy) > l {
  822. return io.ErrUnexpectedEOF
  823. }
  824. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  825. iNdEx += skippy
  826. }
  827. }
  828. if iNdEx > l {
  829. return io.ErrUnexpectedEOF
  830. }
  831. return nil
  832. }
  833. func (m *UnlockRequest) Unmarshal(dAtA []byte) error {
  834. l := len(dAtA)
  835. iNdEx := 0
  836. for iNdEx < l {
  837. preIndex := iNdEx
  838. var wire uint64
  839. for shift := uint(0); ; shift += 7 {
  840. if shift >= 64 {
  841. return ErrIntOverflowV3Lock
  842. }
  843. if iNdEx >= l {
  844. return io.ErrUnexpectedEOF
  845. }
  846. b := dAtA[iNdEx]
  847. iNdEx++
  848. wire |= uint64(b&0x7F) << shift
  849. if b < 0x80 {
  850. break
  851. }
  852. }
  853. fieldNum := int32(wire >> 3)
  854. wireType := int(wire & 0x7)
  855. if wireType == 4 {
  856. return fmt.Errorf("proto: UnlockRequest: wiretype end group for non-group")
  857. }
  858. if fieldNum <= 0 {
  859. return fmt.Errorf("proto: UnlockRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  860. }
  861. switch fieldNum {
  862. case 1:
  863. if wireType != 2 {
  864. return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType)
  865. }
  866. var byteLen int
  867. for shift := uint(0); ; shift += 7 {
  868. if shift >= 64 {
  869. return ErrIntOverflowV3Lock
  870. }
  871. if iNdEx >= l {
  872. return io.ErrUnexpectedEOF
  873. }
  874. b := dAtA[iNdEx]
  875. iNdEx++
  876. byteLen |= int(b&0x7F) << shift
  877. if b < 0x80 {
  878. break
  879. }
  880. }
  881. if byteLen < 0 {
  882. return ErrInvalidLengthV3Lock
  883. }
  884. postIndex := iNdEx + byteLen
  885. if postIndex < 0 {
  886. return ErrInvalidLengthV3Lock
  887. }
  888. if postIndex > l {
  889. return io.ErrUnexpectedEOF
  890. }
  891. m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...)
  892. if m.Key == nil {
  893. m.Key = []byte{}
  894. }
  895. iNdEx = postIndex
  896. default:
  897. iNdEx = preIndex
  898. skippy, err := skipV3Lock(dAtA[iNdEx:])
  899. if err != nil {
  900. return err
  901. }
  902. if skippy < 0 {
  903. return ErrInvalidLengthV3Lock
  904. }
  905. if (iNdEx + skippy) < 0 {
  906. return ErrInvalidLengthV3Lock
  907. }
  908. if (iNdEx + skippy) > l {
  909. return io.ErrUnexpectedEOF
  910. }
  911. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  912. iNdEx += skippy
  913. }
  914. }
  915. if iNdEx > l {
  916. return io.ErrUnexpectedEOF
  917. }
  918. return nil
  919. }
  920. func (m *UnlockResponse) Unmarshal(dAtA []byte) error {
  921. l := len(dAtA)
  922. iNdEx := 0
  923. for iNdEx < l {
  924. preIndex := iNdEx
  925. var wire uint64
  926. for shift := uint(0); ; shift += 7 {
  927. if shift >= 64 {
  928. return ErrIntOverflowV3Lock
  929. }
  930. if iNdEx >= l {
  931. return io.ErrUnexpectedEOF
  932. }
  933. b := dAtA[iNdEx]
  934. iNdEx++
  935. wire |= uint64(b&0x7F) << shift
  936. if b < 0x80 {
  937. break
  938. }
  939. }
  940. fieldNum := int32(wire >> 3)
  941. wireType := int(wire & 0x7)
  942. if wireType == 4 {
  943. return fmt.Errorf("proto: UnlockResponse: wiretype end group for non-group")
  944. }
  945. if fieldNum <= 0 {
  946. return fmt.Errorf("proto: UnlockResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  947. }
  948. switch fieldNum {
  949. case 1:
  950. if wireType != 2 {
  951. return fmt.Errorf("proto: wrong wireType = %d for field Header", wireType)
  952. }
  953. var msglen int
  954. for shift := uint(0); ; shift += 7 {
  955. if shift >= 64 {
  956. return ErrIntOverflowV3Lock
  957. }
  958. if iNdEx >= l {
  959. return io.ErrUnexpectedEOF
  960. }
  961. b := dAtA[iNdEx]
  962. iNdEx++
  963. msglen |= int(b&0x7F) << shift
  964. if b < 0x80 {
  965. break
  966. }
  967. }
  968. if msglen < 0 {
  969. return ErrInvalidLengthV3Lock
  970. }
  971. postIndex := iNdEx + msglen
  972. if postIndex < 0 {
  973. return ErrInvalidLengthV3Lock
  974. }
  975. if postIndex > l {
  976. return io.ErrUnexpectedEOF
  977. }
  978. if m.Header == nil {
  979. m.Header = &etcdserverpb.ResponseHeader{}
  980. }
  981. if err := m.Header.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  982. return err
  983. }
  984. iNdEx = postIndex
  985. default:
  986. iNdEx = preIndex
  987. skippy, err := skipV3Lock(dAtA[iNdEx:])
  988. if err != nil {
  989. return err
  990. }
  991. if skippy < 0 {
  992. return ErrInvalidLengthV3Lock
  993. }
  994. if (iNdEx + skippy) < 0 {
  995. return ErrInvalidLengthV3Lock
  996. }
  997. if (iNdEx + skippy) > l {
  998. return io.ErrUnexpectedEOF
  999. }
  1000. m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1001. iNdEx += skippy
  1002. }
  1003. }
  1004. if iNdEx > l {
  1005. return io.ErrUnexpectedEOF
  1006. }
  1007. return nil
  1008. }
  1009. func skipV3Lock(dAtA []byte) (n int, err error) {
  1010. l := len(dAtA)
  1011. iNdEx := 0
  1012. for iNdEx < l {
  1013. var wire uint64
  1014. for shift := uint(0); ; shift += 7 {
  1015. if shift >= 64 {
  1016. return 0, ErrIntOverflowV3Lock
  1017. }
  1018. if iNdEx >= l {
  1019. return 0, io.ErrUnexpectedEOF
  1020. }
  1021. b := dAtA[iNdEx]
  1022. iNdEx++
  1023. wire |= (uint64(b) & 0x7F) << shift
  1024. if b < 0x80 {
  1025. break
  1026. }
  1027. }
  1028. wireType := int(wire & 0x7)
  1029. switch wireType {
  1030. case 0:
  1031. for shift := uint(0); ; shift += 7 {
  1032. if shift >= 64 {
  1033. return 0, ErrIntOverflowV3Lock
  1034. }
  1035. if iNdEx >= l {
  1036. return 0, io.ErrUnexpectedEOF
  1037. }
  1038. iNdEx++
  1039. if dAtA[iNdEx-1] < 0x80 {
  1040. break
  1041. }
  1042. }
  1043. return iNdEx, nil
  1044. case 1:
  1045. iNdEx += 8
  1046. return iNdEx, nil
  1047. case 2:
  1048. var length int
  1049. for shift := uint(0); ; shift += 7 {
  1050. if shift >= 64 {
  1051. return 0, ErrIntOverflowV3Lock
  1052. }
  1053. if iNdEx >= l {
  1054. return 0, io.ErrUnexpectedEOF
  1055. }
  1056. b := dAtA[iNdEx]
  1057. iNdEx++
  1058. length |= (int(b) & 0x7F) << shift
  1059. if b < 0x80 {
  1060. break
  1061. }
  1062. }
  1063. if length < 0 {
  1064. return 0, ErrInvalidLengthV3Lock
  1065. }
  1066. iNdEx += length
  1067. if iNdEx < 0 {
  1068. return 0, ErrInvalidLengthV3Lock
  1069. }
  1070. return iNdEx, nil
  1071. case 3:
  1072. for {
  1073. var innerWire uint64
  1074. var start int = iNdEx
  1075. for shift := uint(0); ; shift += 7 {
  1076. if shift >= 64 {
  1077. return 0, ErrIntOverflowV3Lock
  1078. }
  1079. if iNdEx >= l {
  1080. return 0, io.ErrUnexpectedEOF
  1081. }
  1082. b := dAtA[iNdEx]
  1083. iNdEx++
  1084. innerWire |= (uint64(b) & 0x7F) << shift
  1085. if b < 0x80 {
  1086. break
  1087. }
  1088. }
  1089. innerWireType := int(innerWire & 0x7)
  1090. if innerWireType == 4 {
  1091. break
  1092. }
  1093. next, err := skipV3Lock(dAtA[start:])
  1094. if err != nil {
  1095. return 0, err
  1096. }
  1097. iNdEx = start + next
  1098. if iNdEx < 0 {
  1099. return 0, ErrInvalidLengthV3Lock
  1100. }
  1101. }
  1102. return iNdEx, nil
  1103. case 4:
  1104. return iNdEx, nil
  1105. case 5:
  1106. iNdEx += 4
  1107. return iNdEx, nil
  1108. default:
  1109. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  1110. }
  1111. }
  1112. panic("unreachable")
  1113. }
  1114. var (
  1115. ErrInvalidLengthV3Lock = fmt.Errorf("proto: negative length found during unmarshaling")
  1116. ErrIntOverflowV3Lock = fmt.Errorf("proto: integer overflow")
  1117. )