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.

472 lines
15 KiB

  1. // Code generated by protoc-gen-go.
  2. // source: seaweed.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package master_pb is a generated protocol buffer package.
  6. It is generated from these files:
  7. seaweed.proto
  8. It has these top-level messages:
  9. Heartbeat
  10. HeartbeatResponse
  11. VolumeInformationMessage
  12. Empty
  13. SuperBlockExtra
  14. */
  15. package master_pb
  16. import proto "github.com/golang/protobuf/proto"
  17. import fmt "fmt"
  18. import math "math"
  19. import (
  20. context "golang.org/x/net/context"
  21. grpc "google.golang.org/grpc"
  22. )
  23. // Reference imports to suppress errors if they are not otherwise used.
  24. var _ = proto.Marshal
  25. var _ = fmt.Errorf
  26. var _ = math.Inf
  27. // This is a compile-time assertion to ensure that this generated file
  28. // is compatible with the proto package it is being compiled against.
  29. // A compilation error at this line likely means your copy of the
  30. // proto package needs to be updated.
  31. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  32. type Heartbeat struct {
  33. Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"`
  34. Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
  35. PublicUrl string `protobuf:"bytes,3,opt,name=public_url,json=publicUrl" json:"public_url,omitempty"`
  36. MaxVolumeCount uint32 `protobuf:"varint,4,opt,name=max_volume_count,json=maxVolumeCount" json:"max_volume_count,omitempty"`
  37. MaxFileKey uint64 `protobuf:"varint,5,opt,name=max_file_key,json=maxFileKey" json:"max_file_key,omitempty"`
  38. DataCenter string `protobuf:"bytes,6,opt,name=data_center,json=dataCenter" json:"data_center,omitempty"`
  39. Rack string `protobuf:"bytes,7,opt,name=rack" json:"rack,omitempty"`
  40. AdminPort uint32 `protobuf:"varint,8,opt,name=admin_port,json=adminPort" json:"admin_port,omitempty"`
  41. Volumes []*VolumeInformationMessage `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"`
  42. }
  43. func (m *Heartbeat) Reset() { *m = Heartbeat{} }
  44. func (m *Heartbeat) String() string { return proto.CompactTextString(m) }
  45. func (*Heartbeat) ProtoMessage() {}
  46. func (*Heartbeat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  47. func (m *Heartbeat) GetIp() string {
  48. if m != nil {
  49. return m.Ip
  50. }
  51. return ""
  52. }
  53. func (m *Heartbeat) GetPort() uint32 {
  54. if m != nil {
  55. return m.Port
  56. }
  57. return 0
  58. }
  59. func (m *Heartbeat) GetPublicUrl() string {
  60. if m != nil {
  61. return m.PublicUrl
  62. }
  63. return ""
  64. }
  65. func (m *Heartbeat) GetMaxVolumeCount() uint32 {
  66. if m != nil {
  67. return m.MaxVolumeCount
  68. }
  69. return 0
  70. }
  71. func (m *Heartbeat) GetMaxFileKey() uint64 {
  72. if m != nil {
  73. return m.MaxFileKey
  74. }
  75. return 0
  76. }
  77. func (m *Heartbeat) GetDataCenter() string {
  78. if m != nil {
  79. return m.DataCenter
  80. }
  81. return ""
  82. }
  83. func (m *Heartbeat) GetRack() string {
  84. if m != nil {
  85. return m.Rack
  86. }
  87. return ""
  88. }
  89. func (m *Heartbeat) GetAdminPort() uint32 {
  90. if m != nil {
  91. return m.AdminPort
  92. }
  93. return 0
  94. }
  95. func (m *Heartbeat) GetVolumes() []*VolumeInformationMessage {
  96. if m != nil {
  97. return m.Volumes
  98. }
  99. return nil
  100. }
  101. type HeartbeatResponse struct {
  102. VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volumeSizeLimit" json:"volumeSizeLimit,omitempty"`
  103. SecretKey string `protobuf:"bytes,2,opt,name=secretKey" json:"secretKey,omitempty"`
  104. Leader string `protobuf:"bytes,3,opt,name=leader" json:"leader,omitempty"`
  105. }
  106. func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
  107. func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) }
  108. func (*HeartbeatResponse) ProtoMessage() {}
  109. func (*HeartbeatResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  110. func (m *HeartbeatResponse) GetVolumeSizeLimit() uint64 {
  111. if m != nil {
  112. return m.VolumeSizeLimit
  113. }
  114. return 0
  115. }
  116. func (m *HeartbeatResponse) GetSecretKey() string {
  117. if m != nil {
  118. return m.SecretKey
  119. }
  120. return ""
  121. }
  122. func (m *HeartbeatResponse) GetLeader() string {
  123. if m != nil {
  124. return m.Leader
  125. }
  126. return ""
  127. }
  128. type VolumeInformationMessage struct {
  129. Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
  130. Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
  131. Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
  132. FileCount uint64 `protobuf:"varint,4,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
  133. DeleteCount uint64 `protobuf:"varint,5,opt,name=delete_count,json=deleteCount" json:"delete_count,omitempty"`
  134. DeletedByteCount uint64 `protobuf:"varint,6,opt,name=deleted_byte_count,json=deletedByteCount" json:"deleted_byte_count,omitempty"`
  135. ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
  136. ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
  137. Version uint32 `protobuf:"varint,9,opt,name=version" json:"version,omitempty"`
  138. Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
  139. }
  140. func (m *VolumeInformationMessage) Reset() { *m = VolumeInformationMessage{} }
  141. func (m *VolumeInformationMessage) String() string { return proto.CompactTextString(m) }
  142. func (*VolumeInformationMessage) ProtoMessage() {}
  143. func (*VolumeInformationMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  144. func (m *VolumeInformationMessage) GetId() uint32 {
  145. if m != nil {
  146. return m.Id
  147. }
  148. return 0
  149. }
  150. func (m *VolumeInformationMessage) GetSize() uint64 {
  151. if m != nil {
  152. return m.Size
  153. }
  154. return 0
  155. }
  156. func (m *VolumeInformationMessage) GetCollection() string {
  157. if m != nil {
  158. return m.Collection
  159. }
  160. return ""
  161. }
  162. func (m *VolumeInformationMessage) GetFileCount() uint64 {
  163. if m != nil {
  164. return m.FileCount
  165. }
  166. return 0
  167. }
  168. func (m *VolumeInformationMessage) GetDeleteCount() uint64 {
  169. if m != nil {
  170. return m.DeleteCount
  171. }
  172. return 0
  173. }
  174. func (m *VolumeInformationMessage) GetDeletedByteCount() uint64 {
  175. if m != nil {
  176. return m.DeletedByteCount
  177. }
  178. return 0
  179. }
  180. func (m *VolumeInformationMessage) GetReadOnly() bool {
  181. if m != nil {
  182. return m.ReadOnly
  183. }
  184. return false
  185. }
  186. func (m *VolumeInformationMessage) GetReplicaPlacement() uint32 {
  187. if m != nil {
  188. return m.ReplicaPlacement
  189. }
  190. return 0
  191. }
  192. func (m *VolumeInformationMessage) GetVersion() uint32 {
  193. if m != nil {
  194. return m.Version
  195. }
  196. return 0
  197. }
  198. func (m *VolumeInformationMessage) GetTtl() uint32 {
  199. if m != nil {
  200. return m.Ttl
  201. }
  202. return 0
  203. }
  204. type Empty struct {
  205. }
  206. func (m *Empty) Reset() { *m = Empty{} }
  207. func (m *Empty) String() string { return proto.CompactTextString(m) }
  208. func (*Empty) ProtoMessage() {}
  209. func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
  210. type SuperBlockExtra struct {
  211. }
  212. func (m *SuperBlockExtra) Reset() { *m = SuperBlockExtra{} }
  213. func (m *SuperBlockExtra) String() string { return proto.CompactTextString(m) }
  214. func (*SuperBlockExtra) ProtoMessage() {}
  215. func (*SuperBlockExtra) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
  216. func init() {
  217. proto.RegisterType((*Heartbeat)(nil), "master_pb.Heartbeat")
  218. proto.RegisterType((*HeartbeatResponse)(nil), "master_pb.HeartbeatResponse")
  219. proto.RegisterType((*VolumeInformationMessage)(nil), "master_pb.VolumeInformationMessage")
  220. proto.RegisterType((*Empty)(nil), "master_pb.Empty")
  221. proto.RegisterType((*SuperBlockExtra)(nil), "master_pb.SuperBlockExtra")
  222. }
  223. // Reference imports to suppress errors if they are not otherwise used.
  224. var _ context.Context
  225. var _ grpc.ClientConn
  226. // This is a compile-time assertion to ensure that this generated file
  227. // is compatible with the grpc package it is being compiled against.
  228. const _ = grpc.SupportPackageIsVersion4
  229. // Client API for Seaweed service
  230. type SeaweedClient interface {
  231. SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error)
  232. KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error)
  233. }
  234. type seaweedClient struct {
  235. cc *grpc.ClientConn
  236. }
  237. func NewSeaweedClient(cc *grpc.ClientConn) SeaweedClient {
  238. return &seaweedClient{cc}
  239. }
  240. func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
  241. stream, err := grpc.NewClientStream(ctx, &_Seaweed_serviceDesc.Streams[0], c.cc, "/master_pb.Seaweed/SendHeartbeat", opts...)
  242. if err != nil {
  243. return nil, err
  244. }
  245. x := &seaweedSendHeartbeatClient{stream}
  246. return x, nil
  247. }
  248. type Seaweed_SendHeartbeatClient interface {
  249. Send(*Heartbeat) error
  250. Recv() (*HeartbeatResponse, error)
  251. grpc.ClientStream
  252. }
  253. type seaweedSendHeartbeatClient struct {
  254. grpc.ClientStream
  255. }
  256. func (x *seaweedSendHeartbeatClient) Send(m *Heartbeat) error {
  257. return x.ClientStream.SendMsg(m)
  258. }
  259. func (x *seaweedSendHeartbeatClient) Recv() (*HeartbeatResponse, error) {
  260. m := new(HeartbeatResponse)
  261. if err := x.ClientStream.RecvMsg(m); err != nil {
  262. return nil, err
  263. }
  264. return m, nil
  265. }
  266. func (c *seaweedClient) KeepConnected(ctx context.Context, opts ...grpc.CallOption) (Seaweed_KeepConnectedClient, error) {
  267. stream, err := grpc.NewClientStream(ctx, &_Seaweed_serviceDesc.Streams[1], c.cc, "/master_pb.Seaweed/KeepConnected", opts...)
  268. if err != nil {
  269. return nil, err
  270. }
  271. x := &seaweedKeepConnectedClient{stream}
  272. return x, nil
  273. }
  274. type Seaweed_KeepConnectedClient interface {
  275. Send(*Empty) error
  276. Recv() (*Empty, error)
  277. grpc.ClientStream
  278. }
  279. type seaweedKeepConnectedClient struct {
  280. grpc.ClientStream
  281. }
  282. func (x *seaweedKeepConnectedClient) Send(m *Empty) error {
  283. return x.ClientStream.SendMsg(m)
  284. }
  285. func (x *seaweedKeepConnectedClient) Recv() (*Empty, error) {
  286. m := new(Empty)
  287. if err := x.ClientStream.RecvMsg(m); err != nil {
  288. return nil, err
  289. }
  290. return m, nil
  291. }
  292. // Server API for Seaweed service
  293. type SeaweedServer interface {
  294. SendHeartbeat(Seaweed_SendHeartbeatServer) error
  295. KeepConnected(Seaweed_KeepConnectedServer) error
  296. }
  297. func RegisterSeaweedServer(s *grpc.Server, srv SeaweedServer) {
  298. s.RegisterService(&_Seaweed_serviceDesc, srv)
  299. }
  300. func _Seaweed_SendHeartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
  301. return srv.(SeaweedServer).SendHeartbeat(&seaweedSendHeartbeatServer{stream})
  302. }
  303. type Seaweed_SendHeartbeatServer interface {
  304. Send(*HeartbeatResponse) error
  305. Recv() (*Heartbeat, error)
  306. grpc.ServerStream
  307. }
  308. type seaweedSendHeartbeatServer struct {
  309. grpc.ServerStream
  310. }
  311. func (x *seaweedSendHeartbeatServer) Send(m *HeartbeatResponse) error {
  312. return x.ServerStream.SendMsg(m)
  313. }
  314. func (x *seaweedSendHeartbeatServer) Recv() (*Heartbeat, error) {
  315. m := new(Heartbeat)
  316. if err := x.ServerStream.RecvMsg(m); err != nil {
  317. return nil, err
  318. }
  319. return m, nil
  320. }
  321. func _Seaweed_KeepConnected_Handler(srv interface{}, stream grpc.ServerStream) error {
  322. return srv.(SeaweedServer).KeepConnected(&seaweedKeepConnectedServer{stream})
  323. }
  324. type Seaweed_KeepConnectedServer interface {
  325. Send(*Empty) error
  326. Recv() (*Empty, error)
  327. grpc.ServerStream
  328. }
  329. type seaweedKeepConnectedServer struct {
  330. grpc.ServerStream
  331. }
  332. func (x *seaweedKeepConnectedServer) Send(m *Empty) error {
  333. return x.ServerStream.SendMsg(m)
  334. }
  335. func (x *seaweedKeepConnectedServer) Recv() (*Empty, error) {
  336. m := new(Empty)
  337. if err := x.ServerStream.RecvMsg(m); err != nil {
  338. return nil, err
  339. }
  340. return m, nil
  341. }
  342. var _Seaweed_serviceDesc = grpc.ServiceDesc{
  343. ServiceName: "master_pb.Seaweed",
  344. HandlerType: (*SeaweedServer)(nil),
  345. Methods: []grpc.MethodDesc{},
  346. Streams: []grpc.StreamDesc{
  347. {
  348. StreamName: "SendHeartbeat",
  349. Handler: _Seaweed_SendHeartbeat_Handler,
  350. ServerStreams: true,
  351. ClientStreams: true,
  352. },
  353. {
  354. StreamName: "KeepConnected",
  355. Handler: _Seaweed_KeepConnected_Handler,
  356. ServerStreams: true,
  357. ClientStreams: true,
  358. },
  359. },
  360. Metadata: "seaweed.proto",
  361. }
  362. func init() { proto.RegisterFile("seaweed.proto", fileDescriptor0) }
  363. var fileDescriptor0 = []byte{
  364. // 553 bytes of a gzipped FileDescriptorProto
  365. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x93, 0xdf, 0x6e, 0xd3, 0x30,
  366. 0x14, 0xc6, 0x49, 0x96, 0xb5, 0xcb, 0xd9, 0xba, 0x75, 0x16, 0x42, 0xd1, 0x18, 0x50, 0xc2, 0x4d,
  367. 0x24, 0xd0, 0x84, 0xc6, 0x15, 0x17, 0xdc, 0x6c, 0x1a, 0x62, 0x1a, 0x88, 0x29, 0x15, 0xdc, 0x46,
  368. 0x6e, 0x72, 0x86, 0xac, 0x39, 0xb6, 0xe5, 0xb8, 0xa3, 0xd9, 0x4b, 0xf0, 0x24, 0xbc, 0x05, 0x0f,
  369. 0x86, 0x7c, 0xd2, 0xb4, 0x15, 0x7f, 0xee, 0xec, 0xdf, 0xf9, 0x4e, 0xfc, 0xe5, 0x7c, 0x36, 0x8c,
  370. 0x1a, 0xe4, 0xdf, 0x11, 0xab, 0x13, 0x63, 0xb5, 0xd3, 0x2c, 0xae, 0x79, 0xe3, 0xd0, 0x16, 0x66,
  371. 0x96, 0xfe, 0x0c, 0x21, 0xfe, 0x80, 0xdc, 0xba, 0x19, 0x72, 0xc7, 0xf6, 0x21, 0x14, 0x26, 0x09,
  372. 0x26, 0x41, 0x16, 0xe7, 0xa1, 0x30, 0x8c, 0x41, 0x64, 0xb4, 0x75, 0x49, 0x38, 0x09, 0xb2, 0x51,
  373. 0x4e, 0x6b, 0xf6, 0x04, 0xc0, 0xcc, 0x67, 0x52, 0x94, 0xc5, 0xdc, 0xca, 0x64, 0x8b, 0xb4, 0x71,
  374. 0x47, 0xbe, 0x58, 0xc9, 0x32, 0x18, 0xd7, 0x7c, 0x51, 0xdc, 0x69, 0x39, 0xaf, 0xb1, 0x28, 0xf5,
  375. 0x5c, 0xb9, 0x24, 0xa2, 0xf6, 0xfd, 0x9a, 0x2f, 0xbe, 0x12, 0x3e, 0xf7, 0x94, 0x4d, 0x60, 0xcf,
  376. 0x2b, 0x6f, 0x84, 0xc4, 0xe2, 0x16, 0xdb, 0x64, 0x7b, 0x12, 0x64, 0x51, 0x0e, 0x35, 0x5f, 0xbc,
  377. 0x17, 0x12, 0xaf, 0xb0, 0x65, 0xcf, 0x60, 0xb7, 0xe2, 0x8e, 0x17, 0x25, 0x2a, 0x87, 0x36, 0x19,
  378. 0xd0, 0x59, 0xe0, 0xd1, 0x39, 0x11, 0xef, 0xcf, 0xf2, 0xf2, 0x36, 0x19, 0x52, 0x85, 0xd6, 0xde,
  379. 0x1f, 0xaf, 0x6a, 0xa1, 0x0a, 0x72, 0xbe, 0x43, 0x47, 0xc7, 0x44, 0xae, 0xbd, 0xfd, 0x77, 0x30,
  380. 0xec, 0xbc, 0x35, 0x49, 0x3c, 0xd9, 0xca, 0x76, 0x4f, 0x5f, 0x9c, 0xac, 0xa6, 0x71, 0xd2, 0xd9,
  381. 0xbb, 0x54, 0x37, 0xda, 0xd6, 0xdc, 0x09, 0xad, 0x3e, 0x61, 0xd3, 0xf0, 0x6f, 0x98, 0xf7, 0x3d,
  382. 0x69, 0x03, 0x87, 0xab, 0x71, 0xe5, 0xd8, 0x18, 0xad, 0x1a, 0x64, 0x19, 0x1c, 0x74, 0xf5, 0xa9,
  383. 0xb8, 0xc7, 0x8f, 0xa2, 0x16, 0x8e, 0x66, 0x18, 0xe5, 0x7f, 0x62, 0x76, 0x0c, 0x71, 0x83, 0xa5,
  384. 0x45, 0x77, 0x85, 0x2d, 0x4d, 0x35, 0xce, 0xd7, 0x80, 0x3d, 0x82, 0x81, 0x44, 0x5e, 0xa1, 0x5d,
  385. 0x8e, 0x75, 0xb9, 0x4b, 0x7f, 0x85, 0x90, 0xfc, 0xcf, 0x1a, 0x65, 0x56, 0xd1, 0x79, 0xa3, 0x3c,
  386. 0x14, 0x95, 0x9f, 0x49, 0x23, 0xee, 0x91, 0xbe, 0x1e, 0xe5, 0xb4, 0x66, 0x4f, 0x01, 0x4a, 0x2d,
  387. 0x25, 0x96, 0xbe, 0x71, 0xf9, 0xf1, 0x0d, 0xe2, 0x67, 0x46, 0x31, 0xac, 0xe3, 0x8a, 0xf2, 0xd8,
  388. 0x93, 0x2e, 0xa9, 0xe7, 0xb0, 0x57, 0xa1, 0x44, 0xd7, 0x0b, 0xba, 0xa4, 0x76, 0x3b, 0xd6, 0x49,
  389. 0x5e, 0x01, 0xeb, 0xb6, 0x55, 0x31, 0x6b, 0x57, 0xc2, 0x01, 0x09, 0xc7, 0xcb, 0xca, 0x59, 0xdb,
  390. 0xab, 0x1f, 0x43, 0x6c, 0x91, 0x57, 0x85, 0x56, 0xb2, 0xa5, 0xf0, 0x76, 0xf2, 0x1d, 0x0f, 0x3e,
  391. 0x2b, 0xd9, 0xb2, 0x97, 0x70, 0x68, 0xd1, 0x48, 0x51, 0xf2, 0xc2, 0x48, 0x5e, 0x62, 0x8d, 0xaa,
  392. 0xcf, 0x71, 0xbc, 0x2c, 0x5c, 0xf7, 0x9c, 0x25, 0x30, 0xbc, 0x43, 0xdb, 0xf8, 0xdf, 0x8a, 0x49,
  393. 0xd2, 0x6f, 0xd9, 0x18, 0xb6, 0x9c, 0x93, 0x09, 0x10, 0xf5, 0xcb, 0x74, 0x08, 0xdb, 0x17, 0xb5,
  394. 0x71, 0x6d, 0x7a, 0x08, 0x07, 0xd3, 0xb9, 0x41, 0x7b, 0x26, 0x75, 0x79, 0x7b, 0xb1, 0x70, 0x96,
  395. 0x9f, 0xfe, 0x08, 0x60, 0x38, 0xed, 0x1e, 0x09, 0xbb, 0x84, 0xd1, 0x14, 0x55, 0xb5, 0x7e, 0x16,
  396. 0x0f, 0x37, 0xae, 0xc8, 0x8a, 0x1e, 0x1d, 0xff, 0x8b, 0xf6, 0x77, 0x22, 0x7d, 0x90, 0x05, 0xaf,
  397. 0x03, 0xf6, 0x16, 0x46, 0x57, 0x88, 0xe6, 0x5c, 0x2b, 0x85, 0xa5, 0xc3, 0x8a, 0x8d, 0x37, 0x9a,
  398. 0xc8, 0xcc, 0xd1, 0x5f, 0xa4, 0x6b, 0x9d, 0x0d, 0xe8, 0xad, 0xbe, 0xf9, 0x1d, 0x00, 0x00, 0xff,
  399. 0xff, 0x29, 0x21, 0x59, 0xcb, 0xbc, 0x03, 0x00, 0x00,
  400. }