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.

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