seaweed.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384
  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. */
  13. package master_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. Leader string `protobuf:"bytes,3,opt,name=leader" json:"leader,omitempty"`
  103. }
  104. func (m *HeartbeatResponse) Reset() { *m = HeartbeatResponse{} }
  105. func (m *HeartbeatResponse) String() string { return proto.CompactTextString(m) }
  106. func (*HeartbeatResponse) ProtoMessage() {}
  107. func (*HeartbeatResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  108. func (m *HeartbeatResponse) GetVolumeSizeLimit() uint64 {
  109. if m != nil {
  110. return m.VolumeSizeLimit
  111. }
  112. return 0
  113. }
  114. func (m *HeartbeatResponse) GetSecretKey() string {
  115. if m != nil {
  116. return m.SecretKey
  117. }
  118. return ""
  119. }
  120. func (m *HeartbeatResponse) GetLeader() string {
  121. if m != nil {
  122. return m.Leader
  123. }
  124. return ""
  125. }
  126. type VolumeInformationMessage struct {
  127. Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
  128. Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
  129. Collection string `protobuf:"bytes,3,opt,name=collection" json:"collection,omitempty"`
  130. FileCount uint64 `protobuf:"varint,4,opt,name=file_count,json=fileCount" json:"file_count,omitempty"`
  131. DeleteCount uint64 `protobuf:"varint,5,opt,name=delete_count,json=deleteCount" json:"delete_count,omitempty"`
  132. DeletedByteCount uint64 `protobuf:"varint,6,opt,name=deleted_byte_count,json=deletedByteCount" json:"deleted_byte_count,omitempty"`
  133. ReadOnly bool `protobuf:"varint,7,opt,name=read_only,json=readOnly" json:"read_only,omitempty"`
  134. ReplicaPlacement uint32 `protobuf:"varint,8,opt,name=replica_placement,json=replicaPlacement" json:"replica_placement,omitempty"`
  135. Version uint32 `protobuf:"varint,9,opt,name=version" json:"version,omitempty"`
  136. Ttl uint32 `protobuf:"varint,10,opt,name=ttl" json:"ttl,omitempty"`
  137. }
  138. func (m *VolumeInformationMessage) Reset() { *m = VolumeInformationMessage{} }
  139. func (m *VolumeInformationMessage) String() string { return proto.CompactTextString(m) }
  140. func (*VolumeInformationMessage) ProtoMessage() {}
  141. func (*VolumeInformationMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
  142. func (m *VolumeInformationMessage) GetId() uint32 {
  143. if m != nil {
  144. return m.Id
  145. }
  146. return 0
  147. }
  148. func (m *VolumeInformationMessage) GetSize() uint64 {
  149. if m != nil {
  150. return m.Size
  151. }
  152. return 0
  153. }
  154. func (m *VolumeInformationMessage) GetCollection() string {
  155. if m != nil {
  156. return m.Collection
  157. }
  158. return ""
  159. }
  160. func (m *VolumeInformationMessage) GetFileCount() uint64 {
  161. if m != nil {
  162. return m.FileCount
  163. }
  164. return 0
  165. }
  166. func (m *VolumeInformationMessage) GetDeleteCount() uint64 {
  167. if m != nil {
  168. return m.DeleteCount
  169. }
  170. return 0
  171. }
  172. func (m *VolumeInformationMessage) GetDeletedByteCount() uint64 {
  173. if m != nil {
  174. return m.DeletedByteCount
  175. }
  176. return 0
  177. }
  178. func (m *VolumeInformationMessage) GetReadOnly() bool {
  179. if m != nil {
  180. return m.ReadOnly
  181. }
  182. return false
  183. }
  184. func (m *VolumeInformationMessage) GetReplicaPlacement() uint32 {
  185. if m != nil {
  186. return m.ReplicaPlacement
  187. }
  188. return 0
  189. }
  190. func (m *VolumeInformationMessage) GetVersion() uint32 {
  191. if m != nil {
  192. return m.Version
  193. }
  194. return 0
  195. }
  196. func (m *VolumeInformationMessage) GetTtl() uint32 {
  197. if m != nil {
  198. return m.Ttl
  199. }
  200. return 0
  201. }
  202. func init() {
  203. proto.RegisterType((*Heartbeat)(nil), "master_pb.Heartbeat")
  204. proto.RegisterType((*HeartbeatResponse)(nil), "master_pb.HeartbeatResponse")
  205. proto.RegisterType((*VolumeInformationMessage)(nil), "master_pb.VolumeInformationMessage")
  206. }
  207. // Reference imports to suppress errors if they are not otherwise used.
  208. var _ context.Context
  209. var _ grpc.ClientConn
  210. // This is a compile-time assertion to ensure that this generated file
  211. // is compatible with the grpc package it is being compiled against.
  212. const _ = grpc.SupportPackageIsVersion4
  213. // Client API for Seaweed service
  214. type SeaweedClient interface {
  215. SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error)
  216. }
  217. type seaweedClient struct {
  218. cc *grpc.ClientConn
  219. }
  220. func NewSeaweedClient(cc *grpc.ClientConn) SeaweedClient {
  221. return &seaweedClient{cc}
  222. }
  223. func (c *seaweedClient) SendHeartbeat(ctx context.Context, opts ...grpc.CallOption) (Seaweed_SendHeartbeatClient, error) {
  224. stream, err := grpc.NewClientStream(ctx, &_Seaweed_serviceDesc.Streams[0], c.cc, "/master_pb.Seaweed/SendHeartbeat", opts...)
  225. if err != nil {
  226. return nil, err
  227. }
  228. x := &seaweedSendHeartbeatClient{stream}
  229. return x, nil
  230. }
  231. type Seaweed_SendHeartbeatClient interface {
  232. Send(*Heartbeat) error
  233. Recv() (*HeartbeatResponse, error)
  234. grpc.ClientStream
  235. }
  236. type seaweedSendHeartbeatClient struct {
  237. grpc.ClientStream
  238. }
  239. func (x *seaweedSendHeartbeatClient) Send(m *Heartbeat) error {
  240. return x.ClientStream.SendMsg(m)
  241. }
  242. func (x *seaweedSendHeartbeatClient) Recv() (*HeartbeatResponse, error) {
  243. m := new(HeartbeatResponse)
  244. if err := x.ClientStream.RecvMsg(m); err != nil {
  245. return nil, err
  246. }
  247. return m, nil
  248. }
  249. // Server API for Seaweed service
  250. type SeaweedServer interface {
  251. SendHeartbeat(Seaweed_SendHeartbeatServer) error
  252. }
  253. func RegisterSeaweedServer(s *grpc.Server, srv SeaweedServer) {
  254. s.RegisterService(&_Seaweed_serviceDesc, srv)
  255. }
  256. func _Seaweed_SendHeartbeat_Handler(srv interface{}, stream grpc.ServerStream) error {
  257. return srv.(SeaweedServer).SendHeartbeat(&seaweedSendHeartbeatServer{stream})
  258. }
  259. type Seaweed_SendHeartbeatServer interface {
  260. Send(*HeartbeatResponse) error
  261. Recv() (*Heartbeat, error)
  262. grpc.ServerStream
  263. }
  264. type seaweedSendHeartbeatServer struct {
  265. grpc.ServerStream
  266. }
  267. func (x *seaweedSendHeartbeatServer) Send(m *HeartbeatResponse) error {
  268. return x.ServerStream.SendMsg(m)
  269. }
  270. func (x *seaweedSendHeartbeatServer) Recv() (*Heartbeat, error) {
  271. m := new(Heartbeat)
  272. if err := x.ServerStream.RecvMsg(m); err != nil {
  273. return nil, err
  274. }
  275. return m, nil
  276. }
  277. var _Seaweed_serviceDesc = grpc.ServiceDesc{
  278. ServiceName: "master_pb.Seaweed",
  279. HandlerType: (*SeaweedServer)(nil),
  280. Methods: []grpc.MethodDesc{},
  281. Streams: []grpc.StreamDesc{
  282. {
  283. StreamName: "SendHeartbeat",
  284. Handler: _Seaweed_SendHeartbeat_Handler,
  285. ServerStreams: true,
  286. ClientStreams: true,
  287. },
  288. },
  289. Metadata: "seaweed.proto",
  290. }
  291. func init() { proto.RegisterFile("seaweed.proto", fileDescriptor0) }
  292. var fileDescriptor0 = []byte{
  293. // 504 bytes of a gzipped FileDescriptorProto
  294. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x93, 0xdf, 0x6e, 0xd3, 0x30,
  295. 0x14, 0xc6, 0x49, 0x16, 0xda, 0xfa, 0x74, 0x1d, 0x9d, 0x85, 0x90, 0x05, 0x03, 0x4a, 0xb9, 0x89,
  296. 0x04, 0xaa, 0xd0, 0xb8, 0xe6, 0x86, 0x49, 0x88, 0x69, 0x20, 0x26, 0x17, 0xb8, 0x8d, 0xdc, 0xe4,
  297. 0x0c, 0x59, 0x73, 0xfe, 0xc8, 0x76, 0x47, 0xb3, 0x77, 0xe2, 0x2d, 0x78, 0x30, 0xe4, 0x93, 0xa6,
  298. 0x9d, 0x10, 0xdc, 0x1d, 0xff, 0xce, 0xe7, 0xf8, 0xe4, 0xfb, 0x6c, 0x98, 0x38, 0x54, 0x3f, 0x11,
  299. 0x8b, 0x45, 0x63, 0x6b, 0x5f, 0x73, 0x56, 0x2a, 0xe7, 0xd1, 0x66, 0xcd, 0x6a, 0xfe, 0x2b, 0x06,
  300. 0xf6, 0x11, 0x95, 0xf5, 0x2b, 0x54, 0x9e, 0x1f, 0x41, 0xac, 0x1b, 0x11, 0xcd, 0xa2, 0x94, 0xc9,
  301. 0x58, 0x37, 0x9c, 0x43, 0xd2, 0xd4, 0xd6, 0x8b, 0x78, 0x16, 0xa5, 0x13, 0x49, 0x35, 0x7f, 0x0a,
  302. 0xd0, 0xac, 0x57, 0x46, 0xe7, 0xd9, 0xda, 0x1a, 0x71, 0x40, 0x5a, 0xd6, 0x91, 0x6f, 0xd6, 0xf0,
  303. 0x14, 0xa6, 0xa5, 0xda, 0x64, 0x37, 0xb5, 0x59, 0x97, 0x98, 0xe5, 0xf5, 0xba, 0xf2, 0x22, 0xa1,
  304. 0xed, 0x47, 0xa5, 0xda, 0x7c, 0x27, 0x7c, 0x16, 0x28, 0x9f, 0xc1, 0x61, 0x50, 0x5e, 0x69, 0x83,
  305. 0xd9, 0x35, 0xb6, 0xe2, 0xfe, 0x2c, 0x4a, 0x13, 0x09, 0xa5, 0xda, 0x7c, 0xd0, 0x06, 0x2f, 0xb0,
  306. 0xe5, 0xcf, 0x61, 0x5c, 0x28, 0xaf, 0xb2, 0x1c, 0x2b, 0x8f, 0x56, 0x0c, 0xe8, 0x2c, 0x08, 0xe8,
  307. 0x8c, 0x48, 0x98, 0xcf, 0xaa, 0xfc, 0x5a, 0x0c, 0xa9, 0x43, 0x75, 0x98, 0x4f, 0x15, 0xa5, 0xae,
  308. 0x32, 0x9a, 0x7c, 0x44, 0x47, 0x33, 0x22, 0x97, 0x61, 0xfc, 0x77, 0x30, 0xec, 0x66, 0x73, 0x82,
  309. 0xcd, 0x0e, 0xd2, 0xf1, 0xe9, 0xcb, 0xc5, 0xce, 0x8d, 0x45, 0x37, 0xde, 0x79, 0x75, 0x55, 0xdb,
  310. 0x52, 0x79, 0x5d, 0x57, 0x9f, 0xd1, 0x39, 0xf5, 0x03, 0x65, 0xbf, 0x67, 0xee, 0xe0, 0x78, 0x67,
  311. 0x97, 0x44, 0xd7, 0xd4, 0x95, 0x43, 0x9e, 0xc2, 0x83, 0xae, 0xbf, 0xd4, 0xb7, 0xf8, 0x49, 0x97,
  312. 0xda, 0x93, 0x87, 0x89, 0xfc, 0x1b, 0xf3, 0x13, 0x60, 0x0e, 0x73, 0x8b, 0xfe, 0x02, 0x5b, 0x72,
  313. 0x95, 0xc9, 0x3d, 0xe0, 0x8f, 0x60, 0x60, 0x50, 0x15, 0x68, 0xb7, 0xb6, 0x6e, 0x57, 0xf3, 0xdf,
  314. 0x31, 0x88, 0xff, 0x8d, 0x46, 0x99, 0x15, 0x74, 0xde, 0x44, 0xc6, 0xba, 0x08, 0x9e, 0x38, 0x7d,
  315. 0x8b, 0xf4, 0xf5, 0x44, 0x52, 0xcd, 0x9f, 0x01, 0xe4, 0xb5, 0x31, 0x98, 0x87, 0x8d, 0xdb, 0x8f,
  316. 0xdf, 0x21, 0xc1, 0x33, 0x8a, 0x61, 0x1f, 0x57, 0x22, 0x59, 0x20, 0x5d, 0x52, 0x2f, 0xe0, 0xb0,
  317. 0x40, 0x83, 0xbe, 0x17, 0x74, 0x49, 0x8d, 0x3b, 0xd6, 0x49, 0x5e, 0x03, 0xef, 0x96, 0x45, 0xb6,
  318. 0x6a, 0x77, 0xc2, 0x01, 0x09, 0xa7, 0xdb, 0xce, 0xfb, 0xb6, 0x57, 0x3f, 0x01, 0x66, 0x51, 0x15,
  319. 0x59, 0x5d, 0x99, 0x96, 0xc2, 0x1b, 0xc9, 0x51, 0x00, 0x5f, 0x2a, 0xd3, 0xf2, 0x57, 0x70, 0x6c,
  320. 0xb1, 0x31, 0x3a, 0x57, 0x59, 0x63, 0x54, 0x8e, 0x25, 0x56, 0x7d, 0x8e, 0xd3, 0x6d, 0xe3, 0xb2,
  321. 0xe7, 0x5c, 0xc0, 0xf0, 0x06, 0xad, 0x0b, 0xbf, 0xc5, 0x48, 0xd2, 0x2f, 0xf9, 0x14, 0x0e, 0xbc,
  322. 0x37, 0x02, 0x88, 0x86, 0xf2, 0xf4, 0x2b, 0x0c, 0x97, 0xdd, 0x3b, 0xe0, 0xe7, 0x30, 0x59, 0x62,
  323. 0x55, 0xec, 0x6f, 0xfe, 0xc3, 0x3b, 0xb7, 0x60, 0x47, 0x1f, 0x9f, 0xfc, 0x8b, 0xf6, 0xb1, 0xcf,
  324. 0xef, 0xa5, 0xd1, 0x9b, 0x68, 0x35, 0xa0, 0x37, 0xf5, 0xf6, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff,
  325. 0x01, 0x14, 0xbb, 0x3a, 0x64, 0x03, 0x00, 0x00,
  326. }