You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

750 lines
26 KiB

6 years ago
6 years ago
6 years ago
6 years ago
  1. // Code generated by protoc-gen-go.
  2. // source: master.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package master_pb is a generated protocol buffer package.
  6. It is generated from these files:
  7. master.proto
  8. It has these top-level messages:
  9. Heartbeat
  10. HeartbeatResponse
  11. VolumeInformationMessage
  12. Empty
  13. SuperBlockExtra
  14. ClientListenRequest
  15. VolumeLocation
  16. LookupVolumeRequest
  17. LookupVolumeResponse
  18. Location
  19. */
  20. package master_pb
  21. import proto "github.com/golang/protobuf/proto"
  22. import fmt "fmt"
  23. import math "math"
  24. import (
  25. context "golang.org/x/net/context"
  26. grpc "google.golang.org/grpc"
  27. )
  28. // Reference imports to suppress errors if they are not otherwise used.
  29. var _ = proto.Marshal
  30. var _ = fmt.Errorf
  31. var _ = math.Inf
  32. // This is a compile-time assertion to ensure that this generated file
  33. // is compatible with the proto package it is being compiled against.
  34. // A compilation error at this line likely means your copy of the
  35. // proto package needs to be updated.
  36. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  37. type Heartbeat struct {
  38. Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"`
  39. Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
  40. PublicUrl string `protobuf:"bytes,3,opt,name=public_url,json=publicUrl" json:"public_url,omitempty"`
  41. MaxVolumeCount uint32 `protobuf:"varint,4,opt,name=max_volume_count,json=maxVolumeCount" json:"max_volume_count,omitempty"`
  42. MaxFileKey uint64 `protobuf:"varint,5,opt,name=max_file_key,json=maxFileKey" json:"max_file_key,omitempty"`
  43. DataCenter string `protobuf:"bytes,6,opt,name=data_center,json=dataCenter" json:"data_center,omitempty"`
  44. Rack string `protobuf:"bytes,7,opt,name=rack" json:"rack,omitempty"`
  45. AdminPort uint32 `protobuf:"varint,8,opt,name=admin_port,json=adminPort" json:"admin_port,omitempty"`
  46. Volumes []*VolumeInformationMessage `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"`
  47. // delta volume ids
  48. NewVids []uint32 `protobuf:"varint,10,rep,packed,name=new_vids,json=newVids" json:"new_vids,omitempty"`
  49. DeletedVids []uint32 `protobuf:"varint,11,rep,packed,name=deleted_vids,json=deletedVids" json:"deleted_vids,omitempty"`
  50. }
  51. func (m *Heartbeat) Reset() { *m = Heartbeat{} }
  52. func (m *Heartbeat) String() string { return proto.CompactTextString(m) }
  53. func (*Heartbeat) ProtoMessage() {}
  54. func (*Heartbeat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  55. func (m *Heartbeat) GetIp() string {
  56. if m != nil {
  57. return m.Ip
  58. }
  59. return ""
  60. }
  61. func (m *Heartbeat) GetPort() uint32 {
  62. if m != nil {
  63. return m.Port
  64. }
  65. return 0
  66. }
  67. func (m *Heartbeat) GetPublicUrl() string {
  68. if m != nil {
  69. return m.PublicUrl
  70. }
  71. return ""
  72. }
  73. func (m *Heartbeat) GetMaxVolumeCount() uint32 {
  74. if m != nil {
  75. return m.MaxVolumeCount
  76. }
  77. return 0
  78. }
  79. func (m *Heartbeat) GetMaxFileKey() uint64 {
  80. if m != nil {
  81. return m.MaxFileKey
  82. }
  83. return 0
  84. }
  85. func (m *Heartbeat) GetDataCenter() string {
  86. if m != nil {
  87. return m.DataCenter
  88. }
  89. return ""
  90. }
  91. func (m *Heartbeat) GetRack() string {
  92. if m != nil {
  93. return m.Rack
  94. }
  95. return ""
  96. }
  97. func (m *Heartbeat) GetAdminPort() uint32 {
  98. if m != nil {
  99. return m.AdminPort
  100. }
  101. return 0
  102. }
  103. func (m *Heartbeat) GetVolumes() []*VolumeInformationMessage {
  104. if m != nil {
  105. return m.Volumes
  106. }
  107. return nil
  108. }
  109. func (m *Heartbeat) GetNewVids() []uint32 {
  110. if m != nil {
  111. return m.NewVids
  112. }
  113. return nil
  114. }
  115. func (m *Heartbeat) GetDeletedVids() []uint32 {
  116. if m != nil {
  117. return m.DeletedVids
  118. }
  119. return nil
  120. }
  121. type HeartbeatResponse struct {
  122. VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volumeSizeLimit" json:"volumeSizeLimit,omitempty"`
  123. SecretKey string `protobuf:"bytes,2,opt,name=secretKey" json:"secretKey,omitempty"`
  124. Leader string `protobuf:"bytes,3,opt,name=leader" json:"leader,omitempty"`
  125. }
  126. func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
  127. func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) }
  128. func (*HeartbeatResponse) ProtoMessage() {}
  129. func (*HeartbeatResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  130. func (m *HeartbeatResponse) GetVolumeSizeLimit() uint64 {
  131. if m != nil {
  132. return m.VolumeSizeLimit
  133. }
  134. return 0
  135. }
  136. func (m *HeartbeatResponse) GetSecretKey() string {
  137. if m != nil {
  138. return m.SecretKey
  139. }
  140. return ""
  141. }
  142. func (m *HeartbeatResponse) GetLeader() string {
  143. if m != nil {
  144. return m.Leader
  145. }
  146. return ""
  147. }
  148. type VolumeInformationMessage struct {
  149. Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
  150. Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
  151. Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
  152. FileCount uint64 `protobuf:"varint,4,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
  153. DeleteCount uint64 `protobuf:"varint,5,opt,name=delete_count,json=deleteCount" json:"delete_count,omitempty"`
  154. DeletedByteCount uint64 `protobuf:"varint,6,opt,name=deleted_byte_count,json=deletedByteCount" json:"deleted_byte_count,omitempty"`
  155. ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
  156. ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
  157. Version uint32 `protobuf:"varint,9,opt,name=version" json:"version,omitempty"`
  158. Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
  159. }
  160. func (m *VolumeInformationMessage) Reset() { *m = VolumeInformationMessage{} }
  161. func (m *VolumeInformationMessage) String() string { return proto.CompactTextString(m) }
  162. func (*VolumeInformationMessage) ProtoMessage() {}
  163. func (*VolumeInformationMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  164. func (m *VolumeInformationMessage) GetId() uint32 {
  165. if m != nil {
  166. return m.Id
  167. }
  168. return 0
  169. }
  170. func (m *VolumeInformationMessage) GetSize() uint64 {
  171. if m != nil {
  172. return m.Size
  173. }
  174. return 0
  175. }
  176. func (m *VolumeInformationMessage) GetCollection() string {
  177. if m != nil {
  178. return m.Collection
  179. }
  180. return ""
  181. }
  182. func (m *VolumeInformationMessage) GetFileCount() uint64 {
  183. if m != nil {
  184. return m.FileCount
  185. }
  186. return 0
  187. }
  188. func (m *VolumeInformationMessage) GetDeleteCount() uint64 {
  189. if m != nil {
  190. return m.DeleteCount
  191. }
  192. return 0
  193. }
  194. func (m *VolumeInformationMessage) GetDeletedByteCount() uint64 {
  195. if m != nil {
  196. return m.DeletedByteCount
  197. }
  198. return 0
  199. }
  200. func (m *VolumeInformationMessage) GetReadOnly() bool {
  201. if m != nil {
  202. return m.ReadOnly
  203. }
  204. return false
  205. }
  206. func (m *VolumeInformationMessage) GetReplicaPlacement() uint32 {
  207. if m != nil {
  208. return m.ReplicaPlacement
  209. }
  210. return 0
  211. }
  212. func (m *VolumeInformationMessage) GetVersion() uint32 {
  213. if m != nil {
  214. return m.Version
  215. }
  216. return 0
  217. }
  218. func (m *VolumeInformationMessage) GetTtl() uint32 {
  219. if m != nil {
  220. return m.Ttl
  221. }
  222. return 0
  223. }
  224. type Empty struct {
  225. }
  226. func (m *Empty) Reset() { *m = Empty{} }
  227. func (m *Empty) String() string { return proto.CompactTextString(m) }
  228. func (*Empty) ProtoMessage() {}
  229. func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  230. type SuperBlockExtra struct {
  231. ErasureCoding *SuperBlockExtra_ErasureCoding `protobuf:"bytes,1,opt,name=erasure_coding,json=erasureCoding" json:"erasure_coding,omitempty"`
  232. }
  233. func (m *SuperBlockExtra) Reset() { *m = SuperBlockExtra{} }
  234. func (m *SuperBlockExtra) String() string { return proto.CompactTextString(m) }
  235. func (*SuperBlockExtra) ProtoMessage() {}
  236. func (*SuperBlockExtra) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  237. func (m *SuperBlockExtra) GetErasureCoding() *SuperBlockExtra_ErasureCoding {
  238. if m != nil {
  239. return m.ErasureCoding
  240. }
  241. return nil
  242. }
  243. type SuperBlockExtra_ErasureCoding struct {
  244. Data uint32 `protobuf:"varint,1,opt,name=data" json:"data,omitempty"`
  245. Parity uint32 `protobuf:"varint,2,opt,name=parity" json:"parity,omitempty"`
  246. VolumeIds []uint32 `protobuf:"varint,3,rep,packed,name=volume_ids,json=volumeIds" json:"volume_ids,omitempty"`
  247. }
  248. func (m *SuperBlockExtra_ErasureCoding) Reset() { *m = SuperBlockExtra_ErasureCoding{} }
  249. func (m *SuperBlockExtra_ErasureCoding) String() string { return proto.CompactTextString(m) }
  250. func (*SuperBlockExtra_ErasureCoding) ProtoMessage() {}
  251. func (*SuperBlockExtra_ErasureCoding) Descriptor() ([]byte, []int) {
  252. return fileDescriptor0, []int{4, 0}
  253. }
  254. func (m *SuperBlockExtra_ErasureCoding) GetData() uint32 {
  255. if m != nil {
  256. return m.Data
  257. }
  258. return 0
  259. }
  260. func (m *SuperBlockExtra_ErasureCoding) GetParity() uint32 {
  261. if m != nil {
  262. return m.Parity
  263. }
  264. return 0
  265. }
  266. func (m *SuperBlockExtra_ErasureCoding) GetVolumeIds() []uint32 {
  267. if m != nil {
  268. return m.VolumeIds
  269. }
  270. return nil
  271. }
  272. type ClientListenRequest struct {
  273. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  274. }
  275. func (m *ClientListenRequest) Reset() { *m = ClientListenRequest{} }
  276. func (m *ClientListenRequest) String() string { return proto.CompactTextString(m) }
  277. func (*ClientListenRequest) ProtoMessage() {}
  278. func (*ClientListenRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
  279. func (m *ClientListenRequest) GetName() string {
  280. if m != nil {
  281. return m.Name
  282. }
  283. return ""
  284. }
  285. type VolumeLocation struct {
  286. Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
  287. PublicUrl string `protobuf:"bytes,2,opt,name=public_url,json=publicUrl" json:"public_url,omitempty"`
  288. NewVids []uint32 `protobuf:"varint,3,rep,packed,name=new_vids,json=newVids" json:"new_vids,omitempty"`
  289. DeletedVids []uint32 `protobuf:"varint,4,rep,packed,name=deleted_vids,json=deletedVids" json:"deleted_vids,omitempty"`
  290. }
  291. func (m *VolumeLocation) Reset() { *m = VolumeLocation{} }
  292. func (m *VolumeLocation) String() string { return proto.CompactTextString(m) }
  293. func (*VolumeLocation) ProtoMessage() {}
  294. func (*VolumeLocation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
  295. func (m *VolumeLocation) GetUrl() string {
  296. if m != nil {
  297. return m.Url
  298. }
  299. return ""
  300. }
  301. func (m *VolumeLocation) GetPublicUrl() string {
  302. if m != nil {
  303. return m.PublicUrl
  304. }
  305. return ""
  306. }
  307. func (m *VolumeLocation) GetNewVids() []uint32 {
  308. if m != nil {
  309. return m.NewVids
  310. }
  311. return nil
  312. }
  313. func (m *VolumeLocation) GetDeletedVids() []uint32 {
  314. if m != nil {
  315. return m.DeletedVids
  316. }
  317. return nil
  318. }
  319. type LookupVolumeRequest struct {
  320. VolumeIds []string `protobuf:"bytes,1,rep,name=volume_ids,json=volumeIds" json:"volume_ids,omitempty"`
  321. Collection string `protobuf:"bytes,2,opt,name=collection" json:"collection,omitempty"`
  322. }
  323. func (m *LookupVolumeRequest) Reset() { *m = LookupVolumeRequest{} }
  324. func (m *LookupVolumeRequest) String() string { return proto.CompactTextString(m) }
  325. func (*LookupVolumeRequest) ProtoMessage() {}
  326. func (*LookupVolumeRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
  327. func (m *LookupVolumeRequest) GetVolumeIds() []string {
  328. if m != nil {
  329. return m.VolumeIds
  330. }
  331. return nil
  332. }
  333. func (m *LookupVolumeRequest) GetCollection() string {
  334. if m != nil {
  335. return m.Collection
  336. }
  337. return ""
  338. }
  339. type LookupVolumeResponse struct {
  340. VolumeIdLocations []*LookupVolumeResponse_VolumeIdLocation `protobuf:"bytes,1,rep,name=volume_id_locations,json=volumeIdLocations" json:"volume_id_locations,omitempty"`
  341. }
  342. func (m *LookupVolumeResponse) Reset() { *m = LookupVolumeResponse{} }
  343. func (m *LookupVolumeResponse) String() string { return proto.CompactTextString(m) }
  344. func (*LookupVolumeResponse) ProtoMessage() {}
  345. func (*LookupVolumeResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
  346. func (m *LookupVolumeResponse) GetVolumeIdLocations() []*LookupVolumeResponse_VolumeIdLocation {
  347. if m != nil {
  348. return m.VolumeIdLocations
  349. }
  350. return nil
  351. }
  352. type LookupVolumeResponse_VolumeIdLocation struct {
  353. VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
  354. Locations []*Location `protobuf:"bytes,2,rep,name=locations" json:"locations,omitempty"`
  355. Error string `protobuf:"bytes,3,opt,name=error" json:"error,omitempty"`
  356. }
  357. func (m *LookupVolumeResponse_VolumeIdLocation) Reset() { *m = LookupVolumeResponse_VolumeIdLocation{} }
  358. func (m *LookupVolumeResponse_VolumeIdLocation) String() string { return proto.CompactTextString(m) }
  359. func (*LookupVolumeResponse_VolumeIdLocation) ProtoMessage() {}
  360. func (*LookupVolumeResponse_VolumeIdLocation) Descriptor() ([]byte, []int) {
  361. return fileDescriptor0, []int{8, 0}
  362. }
  363. func (m *LookupVolumeResponse_VolumeIdLocation) GetVolumeId() string {
  364. if m != nil {
  365. return m.VolumeId
  366. }
  367. return ""
  368. }
  369. func (m *LookupVolumeResponse_VolumeIdLocation) GetLocations() []*Location {
  370. if m != nil {
  371. return m.Locations
  372. }
  373. return nil
  374. }
  375. func (m *LookupVolumeResponse_VolumeIdLocation) GetError() string {
  376. if m != nil {
  377. return m.Error
  378. }
  379. return ""
  380. }
  381. type Location struct {
  382. Url string `protobuf:"bytes,1,opt,name=url" json:"url,omitempty"`
  383. PublicUrl string `protobuf:"bytes,2,opt,name=public_url,json=publicUrl" json:"public_url,omitempty"`
  384. }
  385. func (m *Location) Reset() { *m = Location{} }
  386. func (m *Location) String() string { return proto.CompactTextString(m) }
  387. func (*Location) ProtoMessage() {}
  388. func (*Location) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
  389. func (m *Location) GetUrl() string {
  390. if m != nil {
  391. return m.Url
  392. }
  393. return ""
  394. }
  395. func (m *Location) GetPublicUrl() string {
  396. if m != nil {
  397. return m.PublicUrl
  398. }
  399. return ""
  400. }
  401. func init() {
  402. proto.RegisterType((*Heartbeat)(nil), "master_pb.Heartbeat")
  403. proto.RegisterType((*HeartbeatResponse)(nil), "master_pb.HeartbeatResponse")
  404. proto.RegisterType((*VolumeInformationMessage)(nil), "master_pb.VolumeInformationMessage")
  405. proto.RegisterType((*Empty)(nil), "master_pb.Empty")
  406. proto.RegisterType((*SuperBlockExtra)(nil), "master_pb.SuperBlockExtra")
  407. proto.RegisterType((*SuperBlockExtra_ErasureCoding)(nil), "master_pb.SuperBlockExtra.ErasureCoding")
  408. proto.RegisterType((*ClientListenRequest)(nil), "master_pb.ClientListenRequest")
  409. proto.RegisterType((*VolumeLocation)(nil), "master_pb.VolumeLocation")
  410. proto.RegisterType((*LookupVolumeRequest)(nil), "master_pb.LookupVolumeRequest")
  411. proto.RegisterType((*LookupVolumeResponse)(nil), "master_pb.LookupVolumeResponse")
  412. proto.RegisterType((*LookupVolumeResponse_VolumeIdLocation)(nil), "master_pb.LookupVolumeResponse.VolumeIdLocation")
  413. proto.RegisterType((*Location)(nil), "master_pb.Location")
  414. }
  415. // Reference imports to suppress errors if they are not otherwise used.
  416. var _ context.Context
  417. var _ grpc.ClientConn
  418. // This is a compile-time assertion to ensure that this generated file
  419. // is compatible with the grpc package it is being compiled against.
  420. const _ = grpc.SupportPackageIsVersion4
  421. // Client API for Seaweed service
  422. type SeaweedClient interface {
  423. SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error)
  424. KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error)
  425. LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error)
  426. }
  427. type seaweedClient struct {
  428. cc *grpc.ClientConn
  429. }
  430. func NewSeaweedClient(cc *grpc.ClientConn) SeaweedClient {
  431. return &seaweedClient{cc}
  432. }
  433. func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
  434. stream, err := grpc.NewClientStream(ctx, &_Seaweed_serviceDesc.Streams[0], c.cc, "/master_pb.Seaweed/SendHeartbeat", opts...)
  435. if err != nil {
  436. return nil, err
  437. }
  438. x := &seaweedSendHeartbeatClient{stream}
  439. return x, nil
  440. }
  441. type Seaweed_SendHeartbeatClient interface {
  442. Send(*Heartbeat) error
  443. Recv() (*HeartbeatResponse, error)
  444. grpc.ClientStream
  445. }
  446. type seaweedSendHeartbeatClient struct {
  447. grpc.ClientStream
  448. }
  449. func (x *seaweedSendHeartbeatClient) Send(m *Heartbeat) error {
  450. return x.ClientStream.SendMsg(m)
  451. }
  452. func (x *seaweedSendHeartbeatClient) Recv() (*HeartbeatResponse, error) {
  453. m := new(HeartbeatResponse)
  454. if err := x.ClientStream.RecvMsg(m); err != nil {
  455. return nil, err
  456. }
  457. return m, nil
  458. }
  459. func (c *seaweedClient) KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error) {
  460. stream, err := grpc.NewClientStream(ctx, &_Seaweed_serviceDesc.Streams[1], c.cc, "/master_pb.Seaweed/KeepConnected", opts...)
  461. if err != nil {
  462. return nil, err
  463. }
  464. x := &seaweedKeepConnectedClient{stream}
  465. return x, nil
  466. }
  467. type Seaweed_KeepConnectedClient interface {
  468. Send(*ClientListenRequest) error
  469. Recv() (*VolumeLocation, error)
  470. grpc.ClientStream
  471. }
  472. type seaweedKeepConnectedClient struct {
  473. grpc.ClientStream
  474. }
  475. func (x *seaweedKeepConnectedClient) Send(m *ClientListenRequest) error {
  476. return x.ClientStream.SendMsg(m)
  477. }
  478. func (x *seaweedKeepConnectedClient) Recv() (*VolumeLocation, error) {
  479. m := new(VolumeLocation)
  480. if err := x.ClientStream.RecvMsg(m); err != nil {
  481. return nil, err
  482. }
  483. return m, nil
  484. }
  485. func (c *seaweedClient) LookupVolume(ctx context.Context, in *LookupVolumeRequest, opts ...grpc.CallOption) (*LookupVolumeResponse, error) {
  486. out := new(LookupVolumeResponse)
  487. err := grpc.Invoke(ctx, "/master_pb.Seaweed/LookupVolume", in, out, c.cc, opts...)
  488. if err != nil {
  489. return nil, err
  490. }
  491. return out, nil
  492. }
  493. // Server API for Seaweed service
  494. type SeaweedServer interface {
  495. SendHeartbeat(Seaweed_SendHeartbeatServer) error
  496. KeepConnected(Seaweed_KeepConnectedServer) error
  497. LookupVolume(context.Context, *LookupVolumeRequest) (*LookupVolumeResponse, error)
  498. }
  499. func RegisterSeaweedServer(s *grpc.Server, srv SeaweedServer) {
  500. s.RegisterService(&_Seaweed_serviceDesc, srv)
  501. }
  502. func _Seaweed_SendHeartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
  503. return srv.(SeaweedServer).SendHeartbeat(&seaweedSendHeartbeatServer{stream})
  504. }
  505. type Seaweed_SendHeartbeatServer interface {
  506. Send(*HeartbeatResponse) error
  507. Recv() (*Heartbeat, error)
  508. grpc.ServerStream
  509. }
  510. type seaweedSendHeartbeatServer struct {
  511. grpc.ServerStream
  512. }
  513. func (x *seaweedSendHeartbeatServer) Send(m *HeartbeatResponse) error {
  514. return x.ServerStream.SendMsg(m)
  515. }
  516. func (x *seaweedSendHeartbeatServer) Recv() (*Heartbeat, error) {
  517. m := new(Heartbeat)
  518. if err := x.ServerStream.RecvMsg(m); err != nil {
  519. return nil, err
  520. }
  521. return m, nil
  522. }
  523. func _Seaweed_KeepConnected_Handler(srv interface{}, stream grpc.ServerStream) error {
  524. return srv.(SeaweedServer).KeepConnected(&seaweedKeepConnectedServer{stream})
  525. }
  526. type Seaweed_KeepConnectedServer interface {
  527. Send(*VolumeLocation) error
  528. Recv() (*ClientListenRequest, error)
  529. grpc.ServerStream
  530. }
  531. type seaweedKeepConnectedServer struct {
  532. grpc.ServerStream
  533. }
  534. func (x *seaweedKeepConnectedServer) Send(m *VolumeLocation) error {
  535. return x.ServerStream.SendMsg(m)
  536. }
  537. func (x *seaweedKeepConnectedServer) Recv() (*ClientListenRequest, error) {
  538. m := new(ClientListenRequest)
  539. if err := x.ServerStream.RecvMsg(m); err != nil {
  540. return nil, err
  541. }
  542. return m, nil
  543. }
  544. func _Seaweed_LookupVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  545. in := new(LookupVolumeRequest)
  546. if err := dec(in); err != nil {
  547. return nil, err
  548. }
  549. if interceptor == nil {
  550. return srv.(SeaweedServer).LookupVolume(ctx, in)
  551. }
  552. info := &grpc.UnaryServerInfo{
  553. Server: srv,
  554. FullMethod: "/master_pb.Seaweed/LookupVolume",
  555. }
  556. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  557. return srv.(SeaweedServer).LookupVolume(ctx, req.(*LookupVolumeRequest))
  558. }
  559. return interceptor(ctx, in, info, handler)
  560. }
  561. var _Seaweed_serviceDesc = grpc.ServiceDesc{
  562. ServiceName: "master_pb.Seaweed",
  563. HandlerType: (*SeaweedServer)(nil),
  564. Methods: []grpc.MethodDesc{
  565. {
  566. MethodName: "LookupVolume",
  567. Handler: _Seaweed_LookupVolume_Handler,
  568. },
  569. },
  570. Streams: []grpc.StreamDesc{
  571. {
  572. StreamName: "SendHeartbeat",
  573. Handler: _Seaweed_SendHeartbeat_Handler,
  574. ServerStreams: true,
  575. ClientStreams: true,
  576. },
  577. {
  578. StreamName: "KeepConnected",
  579. Handler: _Seaweed_KeepConnected_Handler,
  580. ServerStreams: true,
  581. ClientStreams: true,
  582. },
  583. },
  584. Metadata: "master.proto",
  585. }
  586. func init() { proto.RegisterFile("master.proto", fileDescriptor0) }
  587. var fileDescriptor0 = []byte{
  588. // 855 bytes of a gzipped FileDescriptorProto
  589. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x6f, 0xdc, 0x44,
  590. 0x14, 0xae, 0xbd, 0x9b, 0xec, 0xfa, 0x6d, 0x36, 0xdd, 0x4c, 0x22, 0xe4, 0x2e, 0xa5, 0x5d, 0xcc,
  591. 0xc5, 0x08, 0x14, 0x95, 0x70, 0x44, 0x5c, 0xba, 0x0a, 0x22, 0x4a, 0x50, 0x83, 0x03, 0x3d, 0x70,
  592. 0x31, 0xb3, 0xf6, 0x6b, 0x35, 0xca, 0x78, 0x6c, 0x66, 0x66, 0x93, 0x75, 0x2f, 0xfc, 0x67, 0x9c,
  593. 0xf8, 0x6f, 0xb8, 0x71, 0xe3, 0x86, 0x66, 0x3c, 0xde, 0x1f, 0x6e, 0x00, 0x89, 0xdb, 0x9b, 0x6f,
  594. 0xde, 0x8f, 0x6f, 0xde, 0xf7, 0x9e, 0x0d, 0x07, 0x05, 0x55, 0x1a, 0xe5, 0x69, 0x25, 0x4b, 0x5d,
  595. 0x92, 0xa0, 0x39, 0xa5, 0xd5, 0x22, 0xfa, 0xc3, 0x87, 0xe0, 0x5b, 0xa4, 0x52, 0x2f, 0x90, 0x6a,
  596. 0x72, 0x08, 0x3e, 0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, 0x21, 0xcc, 0x7a, 0xf1, 0x38, 0x19, 0x08, 0xbc, 0x7f, 0xcd, 0x72, 0x45, 0x3e, 0x86,
  608. 0x83, 0x1c, 0x39, 0x6a, 0xcc, 0x9b, 0xeb, 0x91, 0xbd, 0x1e, 0x39, 0xcc, 0xb8, 0x44, 0x0a, 0x8e,
  609. 0xd6, 0xcd, 0x4e, 0x50, 0x55, 0xa5, 0x50, 0x48, 0x62, 0x78, 0xdc, 0x64, 0xbf, 0x61, 0xef, 0xf0,
  610. 0x8a, 0x15, 0x4c, 0x5b, 0x05, 0xfa, 0x49, 0x17, 0x26, 0x4f, 0x21, 0x50, 0x98, 0x49, 0xd4, 0x97,
  611. 0x58, 0x5b, 0x4d, 0x82, 0x64, 0x03, 0x90, 0x0f, 0x60, 0x9f, 0x23, 0xcd, 0x51, 0x3a, 0x51, 0xdc,
  612. 0x29, 0xfa, 0xdd, 0x87, 0xf0, 0x9f, 0x1e, 0x66, 0x15, 0xcf, 0x6d, 0xbd, 0x71, 0xe2, 0xb3, 0xdc,
  613. 0x74, 0x54, 0xb1, 0x77, 0x68, 0xb3, 0xf7, 0x13, 0x6b, 0x93, 0x67, 0x00, 0x59, 0xc9, 0x39, 0x66,
  614. 0x26, 0xd0, 0x25, 0xdf, 0x42, 0x4c, 0xc7, 0xad, 0x88, 0x1b, 0xb1, 0xfb, 0x49, 0x60, 0x90, 0x46,
  615. 0xe7, 0x75, 0x5f, 0x9c, 0x43, 0xa3, 0xb3, 0xeb, 0x4b, 0xe3, 0xf2, 0x39, 0x90, 0xb6, 0x75, 0x8b,
  616. 0x7a, 0xed, 0xb8, 0x6f, 0x1d, 0x27, 0xee, 0xe6, 0x65, 0xdd, 0x7a, 0x7f, 0x08, 0x81, 0x44, 0x9a,
  617. 0xa7, 0xa5, 0xe0, 0xb5, 0x95, 0x7e, 0x98, 0x0c, 0x0d, 0xf0, 0x4a, 0xf0, 0x9a, 0x7c, 0x06, 0x47,
  618. 0x12, 0x2b, 0xce,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d8, 0xde, 0x98, 0xde, 0xbf, 0x6f, 0x4c, 0xff, 0xfd, 0x8d, 0xf9, 0x01, 0x8e, 0xaf, 0xca, 0xf2,
  630. 0x76, 0x59, 0x35, 0x34, 0x5a, 0xae, 0xbb, 0x2f, 0xf4, 0x66, 0x3d, 0x53, 0x73, 0xfd, 0xc2, 0xce,
  631. 0xc4, 0xfa, 0xdd, 0x89, 0x8d, 0xfe, 0xf4, 0xe0, 0x64, 0x37, 0xad, 0xdb, 0xc5, 0x9f, 0xe1, 0x78,
  632. 0x9d, 0x37, 0xe5, 0xee, 0xcd, 0x4d, 0x81, 0xd1, 0xd9, 0x8b, 0x2d, 0x31, 0x1f, 0x8a, 0x6e, 0x3f,
  633. 0x1f, 0x79, 0xdb, 0xac, 0xe4, 0xe8, 0xae, 0x83, 0xa8, 0xe9, 0x0a, 0x26, 0x5d, 0x37, 0x33, 0xd0,
  634. 0xeb, 0xaa, 0xae, 0xb3, 0xc3, 0x36, 0x92, 0x7c, 0x01, 0xc1, 0x86, 0x88, 0x6f, 0x89, 0x1c, 0xef,
  635. 0x10, 0x71, 0xb5, 0x36, 0x5e, 0xe4, 0x04, 0xf6, 0x50, 0xca, 0xb2, 0xfd, 0x10, 0x34, 0x87, 0xe8,
  636. 0x2b, 0x18, 0xfe, 0x6f, 0x15, 0xcf, 0xfe, 0xf2, 0x60, 0x70, 0x83, 0xf4, 0x1e, 0x31, 0x27, 0x17,
  637. 0x30, 0xbe, 0x41, 0x91, 0x6f, 0x7e, 0x1b, 0x27, 0x5b, 0x7c, 0xd6, 0xe8, 0xf4, 0xe9, 0x43, 0x68,
  638. 0xdb, 0xab, 0xe8, 0x51, 0xec, 0xbd, 0xf0, 0xc8, 0x35, 0x8c, 0x2f, 0x11, 0xab, 0x79, 0x29, 0x04,
  639. 0x66, 0x1a, 0x73, 0xf2, 0x6c, 0x2b, 0xe8, 0x81, 0x21, 0x9d, 0x3e, 0x79, 0xef, 0x6b, 0xdd, 0xbe,
  640. 0xc9, 0x65, 0xfc, 0x1e, 0x0e, 0xb6, 0xb5, 0xd9, 0x49, 0xf8, 0xc0, 0x24, 0x4d, 0x9f, 0xff, 0x87,
  641. 0xa8, 0xd1, 0xa3, 0xc5, 0xbe, 0xfd, 0x6b, 0x7e, 0xf9, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa1,
  642. 0x9f, 0x87, 0x2e, 0x45, 0x07, 0x00, 0x00,
  643. }