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.

375 lines
12 KiB

  1. // Code generated by protoc-gen-go.
  2. // source: seaweed.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package 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. */
  13. package pb
  14. import proto "github.com/golang/protobuf/proto"
  15. import fmt "fmt"
  16. import math "math"
  17. import (
  18. context "golang.org/x/net/context"
  19. grpc "google.golang.org/grpc"
  20. )
  21. // Reference imports to suppress errors if they are not otherwise used.
  22. var _ = proto.Marshal
  23. var _ = fmt.Errorf
  24. var _ = math.Inf
  25. // This is a compile-time assertion to ensure that this generated file
  26. // is compatible with the proto package it is being compiled against.
  27. // A compilation error at this line likely means your copy of the
  28. // proto package needs to be updated.
  29. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  30. type Heartbeat struct {
  31. Ip string `protobuf:"bytes,1,opt,name=ip" json:"ip,omitempty"`
  32. Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
  33. PublicUrl string `protobuf:"bytes,3,opt,name=public_url,json=publicUrl" json:"public_url,omitempty"`
  34. MaxVolumeCount uint32 `protobuf:"varint,4,opt,name=max_volume_count,json=maxVolumeCount" json:"max_volume_count,omitempty"`
  35. MaxFileKey uint64 `protobuf:"varint,5,opt,name=max_file_key,json=maxFileKey" json:"max_file_key,omitempty"`
  36. DataCenter string `protobuf:"bytes,6,opt,name=data_center,json=dataCenter" json:"data_center,omitempty"`
  37. Rack string `protobuf:"bytes,7,opt,name=rack" json:"rack,omitempty"`
  38. AdminPort uint32 `protobuf:"varint,8,opt,name=admin_port,json=adminPort" json:"admin_port,omitempty"`
  39. Volumes []*VolumeInformationMessage `protobuf:"bytes,9,rep,name=volumes" json:"volumes,omitempty"`
  40. }
  41. func (m *Heartbeat) Reset() { *m = Heartbeat{} }
  42. func (m *Heartbeat) String() string { return proto.CompactTextString(m) }
  43. func (*Heartbeat) ProtoMessage() {}
  44. func (*Heartbeat) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  45. func (m *Heartbeat) GetIp() string {
  46. if m != nil {
  47. return m.Ip
  48. }
  49. return ""
  50. }
  51. func (m *Heartbeat) GetPort() uint32 {
  52. if m != nil {
  53. return m.Port
  54. }
  55. return 0
  56. }
  57. func (m *Heartbeat) GetPublicUrl() string {
  58. if m != nil {
  59. return m.PublicUrl
  60. }
  61. return ""
  62. }
  63. func (m *Heartbeat) GetMaxVolumeCount() uint32 {
  64. if m != nil {
  65. return m.MaxVolumeCount
  66. }
  67. return 0
  68. }
  69. func (m *Heartbeat) GetMaxFileKey() uint64 {
  70. if m != nil {
  71. return m.MaxFileKey
  72. }
  73. return 0
  74. }
  75. func (m *Heartbeat) GetDataCenter() string {
  76. if m != nil {
  77. return m.DataCenter
  78. }
  79. return ""
  80. }
  81. func (m *Heartbeat) GetRack() string {
  82. if m != nil {
  83. return m.Rack
  84. }
  85. return ""
  86. }
  87. func (m *Heartbeat) GetAdminPort() uint32 {
  88. if m != nil {
  89. return m.AdminPort
  90. }
  91. return 0
  92. }
  93. func (m *Heartbeat) GetVolumes() []*VolumeInformationMessage {
  94. if m != nil {
  95. return m.Volumes
  96. }
  97. return nil
  98. }
  99. type HeartbeatResponse struct {
  100. VolumeSizeLimit uint64 `protobuf:"varint,1,opt,name=volumeSizeLimit" json:"volumeSizeLimit,omitempty"`
  101. SecretKey string `protobuf:"bytes,2,opt,name=secretKey" json:"secretKey,omitempty"`
  102. }
  103. func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
  104. func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) }
  105. func (*HeartbeatResponse) ProtoMessage() {}
  106. func (*HeartbeatResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  107. func (m *HeartbeatResponse) GetVolumeSizeLimit() uint64 {
  108. if m != nil {
  109. return m.VolumeSizeLimit
  110. }
  111. return 0
  112. }
  113. func (m *HeartbeatResponse) GetSecretKey() string {
  114. if m != nil {
  115. return m.SecretKey
  116. }
  117. return ""
  118. }
  119. type VolumeInformationMessage struct {
  120. Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
  121. Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
  122. Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
  123. FileCount uint64 `protobuf:"varint,4,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
  124. DeleteCount uint64 `protobuf:"varint,5,opt,name=delete_count,json=deleteCount" json:"delete_count,omitempty"`
  125. DeletedByteCount uint64 `protobuf:"varint,6,opt,name=deleted_byte_count,json=deletedByteCount" json:"deleted_byte_count,omitempty"`
  126. ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
  127. ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
  128. Version uint32 `protobuf:"varint,9,opt,name=version" json:"version,omitempty"`
  129. Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
  130. }
  131. func (m *VolumeInformationMessage) Reset() { *m = VolumeInformationMessage{} }
  132. func (m *VolumeInformationMessage) String() string { return proto.CompactTextString(m) }
  133. func (*VolumeInformationMessage) ProtoMessage() {}
  134. func (*VolumeInformationMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  135. func (m *VolumeInformationMessage) GetId() uint32 {
  136. if m != nil {
  137. return m.Id
  138. }
  139. return 0
  140. }
  141. func (m *VolumeInformationMessage) GetSize() uint64 {
  142. if m != nil {
  143. return m.Size
  144. }
  145. return 0
  146. }
  147. func (m *VolumeInformationMessage) GetCollection() string {
  148. if m != nil {
  149. return m.Collection
  150. }
  151. return ""
  152. }
  153. func (m *VolumeInformationMessage) GetFileCount() uint64 {
  154. if m != nil {
  155. return m.FileCount
  156. }
  157. return 0
  158. }
  159. func (m *VolumeInformationMessage) GetDeleteCount() uint64 {
  160. if m != nil {
  161. return m.DeleteCount
  162. }
  163. return 0
  164. }
  165. func (m *VolumeInformationMessage) GetDeletedByteCount() uint64 {
  166. if m != nil {
  167. return m.DeletedByteCount
  168. }
  169. return 0
  170. }
  171. func (m *VolumeInformationMessage) GetReadOnly() bool {
  172. if m != nil {
  173. return m.ReadOnly
  174. }
  175. return false
  176. }
  177. func (m *VolumeInformationMessage) GetReplicaPlacement() uint32 {
  178. if m != nil {
  179. return m.ReplicaPlacement
  180. }
  181. return 0
  182. }
  183. func (m *VolumeInformationMessage) GetVersion() uint32 {
  184. if m != nil {
  185. return m.Version
  186. }
  187. return 0
  188. }
  189. func (m *VolumeInformationMessage) GetTtl() uint32 {
  190. if m != nil {
  191. return m.Ttl
  192. }
  193. return 0
  194. }
  195. func init() {
  196. proto.RegisterType((*Heartbeat)(nil), "pb.Heartbeat")
  197. proto.RegisterType((*HeartbeatResponse)(nil), "pb.HeartbeatResponse")
  198. proto.RegisterType((*VolumeInformationMessage)(nil), "pb.VolumeInformationMessage")
  199. }
  200. // Reference imports to suppress errors if they are not otherwise used.
  201. var _ context.Context
  202. var _ grpc.ClientConn
  203. // This is a compile-time assertion to ensure that this generated file
  204. // is compatible with the grpc package it is being compiled against.
  205. const _ = grpc.SupportPackageIsVersion4
  206. // Client API for Seaweed service
  207. type SeaweedClient interface {
  208. SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error)
  209. }
  210. type seaweedClient struct {
  211. cc *grpc.ClientConn
  212. }
  213. func NewSeaweedClient(cc *grpc.ClientConn) SeaweedClient {
  214. return &seaweedClient{cc}
  215. }
  216. func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
  217. stream, err := grpc.NewClientStream(ctx, &_Seaweed_serviceDesc.Streams[0], c.cc, "/pb.Seaweed/SendHeartbeat", opts...)
  218. if err != nil {
  219. return nil, err
  220. }
  221. x := &seaweedSendHeartbeatClient{stream}
  222. return x, nil
  223. }
  224. type Seaweed_SendHeartbeatClient interface {
  225. Send(*Heartbeat) error
  226. Recv() (*HeartbeatResponse, error)
  227. grpc.ClientStream
  228. }
  229. type seaweedSendHeartbeatClient struct {
  230. grpc.ClientStream
  231. }
  232. func (x *seaweedSendHeartbeatClient) Send(m *Heartbeat) error {
  233. return x.ClientStream.SendMsg(m)
  234. }
  235. func (x *seaweedSendHeartbeatClient) Recv() (*HeartbeatResponse, error) {
  236. m := new(HeartbeatResponse)
  237. if err := x.ClientStream.RecvMsg(m); err != nil {
  238. return nil, err
  239. }
  240. return m, nil
  241. }
  242. // Server API for Seaweed service
  243. type SeaweedServer interface {
  244. SendHeartbeat(Seaweed_SendHeartbeatServer) error
  245. }
  246. func RegisterSeaweedServer(s *grpc.Server, srv SeaweedServer) {
  247. s.RegisterService(&_Seaweed_serviceDesc, srv)
  248. }
  249. func _Seaweed_SendHeartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
  250. return srv.(SeaweedServer).SendHeartbeat(&seaweedSendHeartbeatServer{stream})
  251. }
  252. type Seaweed_SendHeartbeatServer interface {
  253. Send(*HeartbeatResponse) error
  254. Recv() (*Heartbeat, error)
  255. grpc.ServerStream
  256. }
  257. type seaweedSendHeartbeatServer struct {
  258. grpc.ServerStream
  259. }
  260. func (x *seaweedSendHeartbeatServer) Send(m *HeartbeatResponse) error {
  261. return x.ServerStream.SendMsg(m)
  262. }
  263. func (x *seaweedSendHeartbeatServer) Recv() (*Heartbeat, error) {
  264. m := new(Heartbeat)
  265. if err := x.ServerStream.RecvMsg(m); err != nil {
  266. return nil, err
  267. }
  268. return m, nil
  269. }
  270. var _Seaweed_serviceDesc = grpc.ServiceDesc{
  271. ServiceName: "pb.Seaweed",
  272. HandlerType: (*SeaweedServer)(nil),
  273. Methods: []grpc.MethodDesc{},
  274. Streams: []grpc.StreamDesc{
  275. {
  276. StreamName: "SendHeartbeat",
  277. Handler: _Seaweed_SendHeartbeat_Handler,
  278. ServerStreams: true,
  279. ClientStreams: true,
  280. },
  281. },
  282. Metadata: "seaweed.proto",
  283. }
  284. func init() { proto.RegisterFile("seaweed.proto", fileDescriptor0) }
  285. var fileDescriptor0 = []byte{
  286. // 489 bytes of a gzipped FileDescriptorProto
  287. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x93, 0xdf, 0x8a, 0xd3, 0x40,
  288. 0x14, 0xc6, 0x4d, 0x1a, 0xdb, 0xe6, 0x74, 0xbb, 0x76, 0x07, 0x84, 0x41, 0x57, 0x8d, 0xbd, 0x0a,
  289. 0x28, 0x45, 0x56, 0xf0, 0xc6, 0x3b, 0x17, 0x16, 0x65, 0x15, 0x97, 0x29, 0x7a, 0xe3, 0x45, 0x98,
  290. 0x24, 0x67, 0x65, 0xd8, 0xc9, 0x1f, 0x26, 0xd3, 0xb5, 0xd9, 0x07, 0xf2, 0x49, 0x7c, 0x30, 0x99,
  291. 0x33, 0x4d, 0xab, 0x82, 0x77, 0xe7, 0xfc, 0xce, 0x97, 0xe4, 0x9b, 0xf3, 0x4d, 0x60, 0xde, 0xa1,
  292. 0xfc, 0x81, 0x58, 0xae, 0x5a, 0xd3, 0xd8, 0x86, 0x85, 0x6d, 0xbe, 0xfc, 0x19, 0x42, 0xfc, 0x1e,
  293. 0xa5, 0xb1, 0x39, 0x4a, 0xcb, 0x8e, 0x21, 0x54, 0x2d, 0x0f, 0x92, 0x20, 0x8d, 0x45, 0xa8, 0x5a,
  294. 0xc6, 0x20, 0x6a, 0x1b, 0x63, 0x79, 0x98, 0x04, 0xe9, 0x5c, 0x50, 0xcd, 0x9e, 0x00, 0xb4, 0x9b,
  295. 0x5c, 0xab, 0x22, 0xdb, 0x18, 0xcd, 0x47, 0xa4, 0x8d, 0x3d, 0xf9, 0x62, 0x34, 0x4b, 0x61, 0x51,
  296. 0xc9, 0x6d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0xa1, 0x3b, 0x75, 0x87, 0xf4, 0x96, 0x48, 0x50, 0xcd, 0x9e, 0x02, 0x14, 0x8d, 0xd6, 0x58, 0xb8,
  308. 0x07, 0x77, 0xa1, 0xfc, 0x41, 0xdc, 0x52, 0x68, 0xcf, 0x87, 0x3c, 0x22, 0x11, 0x3b, 0xe2, 0xa3,
  309. 0x78, 0x0e, 0x47, 0x25, 0x6a, 0xb4, 0x83, 0xc0, 0x47, 0x31, 0xf3, 0xcc, 0x4b, 0x5e, 0x02, 0xf3,
  310. 0x6d, 0x99, 0xe5, 0xfd, 0x5e, 0x38, 0x26, 0xe1, 0x62, 0x37, 0x79, 0xd7, 0x0f, 0xea, 0xc7, 0x10,
  311. 0x1b, 0x94, 0x65, 0xd6, 0xd4, 0xba, 0xa7, 0x74, 0xa6, 0x62, 0xea, 0xc0, 0xe7, 0x5a, 0xf7, 0xec,
  312. 0x05, 0x9c, 0x18, 0x6c, 0xb5, 0x2a, 0x64, 0xd6, 0x6a, 0x59, 0x60, 0x85, 0xf5, 0x10, 0xd4, 0x62,
  313. 0x37, 0xb8, 0x1a, 0x38, 0xe3, 0x30, 0xb9, 0x45, 0xd3, 0xb9, 0x63, 0xc5, 0x24, 0x19, 0x5a, 0xb6,
  314. 0x80, 0x91, 0xb5, 0x9a, 0x03, 0x51, 0x57, 0x9e, 0x5d, 0xc0, 0x64, 0xed, 0x6f, 0x38, 0x7b, 0x0b,
  315. 0xf3, 0x35, 0xd6, 0xe5, 0xe1, 0x6a, 0xcf, 0x5d, 0xcc, 0xfb, 0xf6, 0xd1, 0xc3, 0xbf, 0xda, 0x21,
  316. 0xd0, 0xe5, 0xbd, 0x34, 0x78, 0x15, 0xe4, 0x63, 0xfa, 0x3f, 0x5e, 0xff, 0x0e, 0x00, 0x00, 0xff,
  317. 0xff, 0xd5, 0x08, 0xa6, 0xf2, 0x30, 0x03, 0x00, 0x00,
  318. }