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.

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