client.pb.go 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // versions:
  3. // protoc-gen-go v1.25.0-devel
  4. // protoc v3.13.0
  5. // source: client.proto
  6. package linux
  7. import (
  8. context "context"
  9. empty "github.com/golang/protobuf/ptypes/empty"
  10. grpc "google.golang.org/grpc"
  11. codes "google.golang.org/grpc/codes"
  12. status "google.golang.org/grpc/status"
  13. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  14. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  15. reflect "reflect"
  16. sync "sync"
  17. )
  18. const (
  19. // Verify that this generated code is sufficiently up-to-date.
  20. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  21. // Verify that runtime/protoimpl is sufficiently up-to-date.
  22. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  23. )
  24. //default id
  25. type Server struct {
  26. state protoimpl.MessageState
  27. sizeCache protoimpl.SizeCache
  28. unknownFields protoimpl.UnknownFields
  29. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
  30. Secret string `protobuf:"bytes,2,opt,name=secret,proto3" json:"secret,omitempty"`
  31. Timestamp int64 `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
  32. }
  33. func (x *Server) Reset() {
  34. *x = Server{}
  35. if protoimpl.UnsafeEnabled {
  36. mi := &file_client_proto_msgTypes[0]
  37. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  38. ms.StoreMessageInfo(mi)
  39. }
  40. }
  41. func (x *Server) String() string {
  42. return protoimpl.X.MessageStringOf(x)
  43. }
  44. func (*Server) ProtoMessage() {}
  45. func (x *Server) ProtoReflect() protoreflect.Message {
  46. mi := &file_client_proto_msgTypes[0]
  47. if protoimpl.UnsafeEnabled && x != nil {
  48. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  49. if ms.LoadMessageInfo() == nil {
  50. ms.StoreMessageInfo(mi)
  51. }
  52. return ms
  53. }
  54. return mi.MessageOf(x)
  55. }
  56. // Deprecated: Use Server.ProtoReflect.Descriptor instead.
  57. func (*Server) Descriptor() ([]byte, []int) {
  58. return file_client_proto_rawDescGZIP(), []int{0}
  59. }
  60. func (x *Server) GetId() string {
  61. if x != nil {
  62. return x.Id
  63. }
  64. return ""
  65. }
  66. func (x *Server) GetSecret() string {
  67. if x != nil {
  68. return x.Secret
  69. }
  70. return ""
  71. }
  72. func (x *Server) GetTimestamp() int64 {
  73. if x != nil {
  74. return x.Timestamp
  75. }
  76. return 0
  77. }
  78. // default success msg
  79. type SuccessMsg struct {
  80. state protoimpl.MessageState
  81. sizeCache protoimpl.SizeCache
  82. unknownFields protoimpl.UnknownFields
  83. Success int32 `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
  84. Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
  85. }
  86. func (x *SuccessMsg) Reset() {
  87. *x = SuccessMsg{}
  88. if protoimpl.UnsafeEnabled {
  89. mi := &file_client_proto_msgTypes[1]
  90. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  91. ms.StoreMessageInfo(mi)
  92. }
  93. }
  94. func (x *SuccessMsg) String() string {
  95. return protoimpl.X.MessageStringOf(x)
  96. }
  97. func (*SuccessMsg) ProtoMessage() {}
  98. func (x *SuccessMsg) ProtoReflect() protoreflect.Message {
  99. mi := &file_client_proto_msgTypes[1]
  100. if protoimpl.UnsafeEnabled && x != nil {
  101. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  102. if ms.LoadMessageInfo() == nil {
  103. ms.StoreMessageInfo(mi)
  104. }
  105. return ms
  106. }
  107. return mi.MessageOf(x)
  108. }
  109. // Deprecated: Use SuccessMsg.ProtoReflect.Descriptor instead.
  110. func (*SuccessMsg) Descriptor() ([]byte, []int) {
  111. return file_client_proto_rawDescGZIP(), []int{1}
  112. }
  113. func (x *SuccessMsg) GetSuccess() int32 {
  114. if x != nil {
  115. return x.Success
  116. }
  117. return 0
  118. }
  119. func (x *SuccessMsg) GetMsg() string {
  120. if x != nil {
  121. return x.Msg
  122. }
  123. return ""
  124. }
  125. // Ping
  126. type PingResp struct {
  127. state protoimpl.MessageState
  128. sizeCache protoimpl.SizeCache
  129. unknownFields protoimpl.UnknownFields
  130. Success int32 `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
  131. }
  132. func (x *PingResp) Reset() {
  133. *x = PingResp{}
  134. if protoimpl.UnsafeEnabled {
  135. mi := &file_client_proto_msgTypes[2]
  136. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  137. ms.StoreMessageInfo(mi)
  138. }
  139. }
  140. func (x *PingResp) String() string {
  141. return protoimpl.X.MessageStringOf(x)
  142. }
  143. func (*PingResp) ProtoMessage() {}
  144. func (x *PingResp) ProtoReflect() protoreflect.Message {
  145. mi := &file_client_proto_msgTypes[2]
  146. if protoimpl.UnsafeEnabled && x != nil {
  147. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  148. if ms.LoadMessageInfo() == nil {
  149. ms.StoreMessageInfo(mi)
  150. }
  151. return ms
  152. }
  153. return mi.MessageOf(x)
  154. }
  155. // Deprecated: Use PingResp.ProtoReflect.Descriptor instead.
  156. func (*PingResp) Descriptor() ([]byte, []int) {
  157. return file_client_proto_rawDescGZIP(), []int{2}
  158. }
  159. func (x *PingResp) GetSuccess() int32 {
  160. if x != nil {
  161. return x.Success
  162. }
  163. return 0
  164. }
  165. // Init
  166. type InitReq struct {
  167. state protoimpl.MessageState
  168. sizeCache protoimpl.SizeCache
  169. unknownFields protoimpl.UnknownFields
  170. Server *Server `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  171. CPU []*CPUInit `protobuf:"bytes,2,rep,name=CPU,proto3" json:"CPU,omitempty"` // repeated 重复的(数组)
  172. }
  173. func (x *InitReq) Reset() {
  174. *x = InitReq{}
  175. if protoimpl.UnsafeEnabled {
  176. mi := &file_client_proto_msgTypes[3]
  177. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  178. ms.StoreMessageInfo(mi)
  179. }
  180. }
  181. func (x *InitReq) String() string {
  182. return protoimpl.X.MessageStringOf(x)
  183. }
  184. func (*InitReq) ProtoMessage() {}
  185. func (x *InitReq) ProtoReflect() protoreflect.Message {
  186. mi := &file_client_proto_msgTypes[3]
  187. if protoimpl.UnsafeEnabled && x != nil {
  188. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  189. if ms.LoadMessageInfo() == nil {
  190. ms.StoreMessageInfo(mi)
  191. }
  192. return ms
  193. }
  194. return mi.MessageOf(x)
  195. }
  196. // Deprecated: Use InitReq.ProtoReflect.Descriptor instead.
  197. func (*InitReq) Descriptor() ([]byte, []int) {
  198. return file_client_proto_rawDescGZIP(), []int{3}
  199. }
  200. func (x *InitReq) GetServer() *Server {
  201. if x != nil {
  202. return x.Server
  203. }
  204. return nil
  205. }
  206. func (x *InitReq) GetCPU() []*CPUInit {
  207. if x != nil {
  208. return x.CPU
  209. }
  210. return nil
  211. }
  212. type CPUInit struct {
  213. state protoimpl.MessageState
  214. sizeCache protoimpl.SizeCache
  215. unknownFields protoimpl.UnknownFields
  216. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  217. Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"`
  218. Mhz float64 `protobuf:"fixed64,3,opt,name=mhz,proto3" json:"mhz,omitempty"`
  219. CacheSize int32 `protobuf:"varint,4,opt,name=cacheSize,proto3" json:"cacheSize,omitempty"`
  220. }
  221. func (x *CPUInit) Reset() {
  222. *x = CPUInit{}
  223. if protoimpl.UnsafeEnabled {
  224. mi := &file_client_proto_msgTypes[4]
  225. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  226. ms.StoreMessageInfo(mi)
  227. }
  228. }
  229. func (x *CPUInit) String() string {
  230. return protoimpl.X.MessageStringOf(x)
  231. }
  232. func (*CPUInit) ProtoMessage() {}
  233. func (x *CPUInit) ProtoReflect() protoreflect.Message {
  234. mi := &file_client_proto_msgTypes[4]
  235. if protoimpl.UnsafeEnabled && x != nil {
  236. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  237. if ms.LoadMessageInfo() == nil {
  238. ms.StoreMessageInfo(mi)
  239. }
  240. return ms
  241. }
  242. return mi.MessageOf(x)
  243. }
  244. // Deprecated: Use CPUInit.ProtoReflect.Descriptor instead.
  245. func (*CPUInit) Descriptor() ([]byte, []int) {
  246. return file_client_proto_rawDescGZIP(), []int{4}
  247. }
  248. func (x *CPUInit) GetName() string {
  249. if x != nil {
  250. return x.Name
  251. }
  252. return ""
  253. }
  254. func (x *CPUInit) GetCount() int32 {
  255. if x != nil {
  256. return x.Count
  257. }
  258. return 0
  259. }
  260. func (x *CPUInit) GetMhz() float64 {
  261. if x != nil {
  262. return x.Mhz
  263. }
  264. return 0
  265. }
  266. func (x *CPUInit) GetCacheSize() int32 {
  267. if x != nil {
  268. return x.CacheSize
  269. }
  270. return 0
  271. }
  272. // memory
  273. type MemoryReq struct {
  274. state protoimpl.MessageState
  275. sizeCache protoimpl.SizeCache
  276. unknownFields protoimpl.UnknownFields
  277. Server *Server `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  278. Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
  279. Free uint64 `protobuf:"varint,3,opt,name=free,proto3" json:"free,omitempty"`
  280. Used uint64 `protobuf:"varint,4,opt,name=used,proto3" json:"used,omitempty"`
  281. Cached uint64 `protobuf:"varint,5,opt,name=cached,proto3" json:"cached,omitempty"`
  282. UsedPercent float64 `protobuf:"fixed64,6,opt,name=usedPercent,proto3" json:"usedPercent,omitempty"`
  283. }
  284. func (x *MemoryReq) Reset() {
  285. *x = MemoryReq{}
  286. if protoimpl.UnsafeEnabled {
  287. mi := &file_client_proto_msgTypes[5]
  288. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  289. ms.StoreMessageInfo(mi)
  290. }
  291. }
  292. func (x *MemoryReq) String() string {
  293. return protoimpl.X.MessageStringOf(x)
  294. }
  295. func (*MemoryReq) ProtoMessage() {}
  296. func (x *MemoryReq) ProtoReflect() protoreflect.Message {
  297. mi := &file_client_proto_msgTypes[5]
  298. if protoimpl.UnsafeEnabled && x != nil {
  299. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  300. if ms.LoadMessageInfo() == nil {
  301. ms.StoreMessageInfo(mi)
  302. }
  303. return ms
  304. }
  305. return mi.MessageOf(x)
  306. }
  307. // Deprecated: Use MemoryReq.ProtoReflect.Descriptor instead.
  308. func (*MemoryReq) Descriptor() ([]byte, []int) {
  309. return file_client_proto_rawDescGZIP(), []int{5}
  310. }
  311. func (x *MemoryReq) GetServer() *Server {
  312. if x != nil {
  313. return x.Server
  314. }
  315. return nil
  316. }
  317. func (x *MemoryReq) GetTotal() uint64 {
  318. if x != nil {
  319. return x.Total
  320. }
  321. return 0
  322. }
  323. func (x *MemoryReq) GetFree() uint64 {
  324. if x != nil {
  325. return x.Free
  326. }
  327. return 0
  328. }
  329. func (x *MemoryReq) GetUsed() uint64 {
  330. if x != nil {
  331. return x.Used
  332. }
  333. return 0
  334. }
  335. func (x *MemoryReq) GetCached() uint64 {
  336. if x != nil {
  337. return x.Cached
  338. }
  339. return 0
  340. }
  341. func (x *MemoryReq) GetUsedPercent() float64 {
  342. if x != nil {
  343. return x.UsedPercent
  344. }
  345. return 0
  346. }
  347. // network io
  348. type NetReq struct {
  349. state protoimpl.MessageState
  350. sizeCache protoimpl.SizeCache
  351. unknownFields protoimpl.UnknownFields
  352. Server *Server `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  353. BytesRecv uint64 `protobuf:"varint,2,opt,name=bytesRecv,proto3" json:"bytesRecv,omitempty"`
  354. BytesSent uint64 `protobuf:"varint,3,opt,name=bytesSent,proto3" json:"bytesSent,omitempty"`
  355. PacketsRecv uint64 `protobuf:"varint,4,opt,name=packetsRecv,proto3" json:"packetsRecv,omitempty"`
  356. PacketsSent uint64 `protobuf:"varint,5,opt,name=packetsSent,proto3" json:"packetsSent,omitempty"`
  357. }
  358. func (x *NetReq) Reset() {
  359. *x = NetReq{}
  360. if protoimpl.UnsafeEnabled {
  361. mi := &file_client_proto_msgTypes[6]
  362. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  363. ms.StoreMessageInfo(mi)
  364. }
  365. }
  366. func (x *NetReq) String() string {
  367. return protoimpl.X.MessageStringOf(x)
  368. }
  369. func (*NetReq) ProtoMessage() {}
  370. func (x *NetReq) ProtoReflect() protoreflect.Message {
  371. mi := &file_client_proto_msgTypes[6]
  372. if protoimpl.UnsafeEnabled && x != nil {
  373. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  374. if ms.LoadMessageInfo() == nil {
  375. ms.StoreMessageInfo(mi)
  376. }
  377. return ms
  378. }
  379. return mi.MessageOf(x)
  380. }
  381. // Deprecated: Use NetReq.ProtoReflect.Descriptor instead.
  382. func (*NetReq) Descriptor() ([]byte, []int) {
  383. return file_client_proto_rawDescGZIP(), []int{6}
  384. }
  385. func (x *NetReq) GetServer() *Server {
  386. if x != nil {
  387. return x.Server
  388. }
  389. return nil
  390. }
  391. func (x *NetReq) GetBytesRecv() uint64 {
  392. if x != nil {
  393. return x.BytesRecv
  394. }
  395. return 0
  396. }
  397. func (x *NetReq) GetBytesSent() uint64 {
  398. if x != nil {
  399. return x.BytesSent
  400. }
  401. return 0
  402. }
  403. func (x *NetReq) GetPacketsRecv() uint64 {
  404. if x != nil {
  405. return x.PacketsRecv
  406. }
  407. return 0
  408. }
  409. func (x *NetReq) GetPacketsSent() uint64 {
  410. if x != nil {
  411. return x.PacketsSent
  412. }
  413. return 0
  414. }
  415. // cpu percent
  416. type CPUReq struct {
  417. state protoimpl.MessageState
  418. sizeCache protoimpl.SizeCache
  419. unknownFields protoimpl.UnknownFields
  420. Server *Server `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
  421. Percent float64 `protobuf:"fixed64,2,opt,name=percent,proto3" json:"percent,omitempty"`
  422. }
  423. func (x *CPUReq) Reset() {
  424. *x = CPUReq{}
  425. if protoimpl.UnsafeEnabled {
  426. mi := &file_client_proto_msgTypes[7]
  427. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  428. ms.StoreMessageInfo(mi)
  429. }
  430. }
  431. func (x *CPUReq) String() string {
  432. return protoimpl.X.MessageStringOf(x)
  433. }
  434. func (*CPUReq) ProtoMessage() {}
  435. func (x *CPUReq) ProtoReflect() protoreflect.Message {
  436. mi := &file_client_proto_msgTypes[7]
  437. if protoimpl.UnsafeEnabled && x != nil {
  438. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  439. if ms.LoadMessageInfo() == nil {
  440. ms.StoreMessageInfo(mi)
  441. }
  442. return ms
  443. }
  444. return mi.MessageOf(x)
  445. }
  446. // Deprecated: Use CPUReq.ProtoReflect.Descriptor instead.
  447. func (*CPUReq) Descriptor() ([]byte, []int) {
  448. return file_client_proto_rawDescGZIP(), []int{7}
  449. }
  450. func (x *CPUReq) GetServer() *Server {
  451. if x != nil {
  452. return x.Server
  453. }
  454. return nil
  455. }
  456. func (x *CPUReq) GetPercent() float64 {
  457. if x != nil {
  458. return x.Percent
  459. }
  460. return 0
  461. }
  462. var File_client_proto protoreflect.FileDescriptor
  463. var file_client_proto_rawDesc = []byte{
  464. 0x0a, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05,
  465. 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
  466. 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f,
  467. 0x74, 0x6f, 0x22, 0x4e, 0x0a, 0x06, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02,
  468. 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06,
  469. 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65,
  470. 0x63, 0x72, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
  471. 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
  472. 0x6d, 0x70, 0x22, 0x38, 0x0a, 0x0a, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x73, 0x67,
  473. 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28,
  474. 0x05, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73,
  475. 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x24, 0x0a, 0x08,
  476. 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63,
  477. 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65,
  478. 0x73, 0x73, 0x22, 0x52, 0x0a, 0x07, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a,
  479. 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e,
  480. 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65,
  481. 0x72, 0x76, 0x65, 0x72, 0x12, 0x20, 0x0a, 0x03, 0x43, 0x50, 0x55, 0x18, 0x02, 0x20, 0x03, 0x28,
  482. 0x0b, 0x32, 0x0e, 0x2e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x43, 0x50, 0x55, 0x49, 0x6e, 0x69,
  483. 0x74, 0x52, 0x03, 0x43, 0x50, 0x55, 0x22, 0x63, 0x0a, 0x07, 0x43, 0x50, 0x55, 0x49, 0x6e, 0x69,
  484. 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
  485. 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02,
  486. 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d,
  487. 0x68, 0x7a, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6d, 0x68, 0x7a, 0x12, 0x1c, 0x0a,
  488. 0x09, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05,
  489. 0x52, 0x09, 0x63, 0x61, 0x63, 0x68, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x09,
  490. 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x06, 0x73, 0x65, 0x72,
  491. 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x69, 0x6e, 0x75,
  492. 0x78, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72,
  493. 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
  494. 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x65, 0x65, 0x18, 0x03,
  495. 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x66, 0x72, 0x65, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73,
  496. 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x75, 0x73, 0x65, 0x64, 0x12, 0x16,
  497. 0x0a, 0x06, 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06,
  498. 0x63, 0x61, 0x63, 0x68, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x64, 0x50, 0x65,
  499. 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x75, 0x73, 0x65,
  500. 0x64, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x22, 0xaf, 0x01, 0x0a, 0x06, 0x4e, 0x65, 0x74,
  501. 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20,
  502. 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x53, 0x65, 0x72, 0x76,
  503. 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x79,
  504. 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x76, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62,
  505. 0x79, 0x74, 0x65, 0x73, 0x52, 0x65, 0x63, 0x76, 0x12, 0x1c, 0x0a, 0x09, 0x62, 0x79, 0x74, 0x65,
  506. 0x73, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x62, 0x79, 0x74,
  507. 0x65, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74,
  508. 0x73, 0x52, 0x65, 0x63, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70, 0x61, 0x63,
  509. 0x6b, 0x65, 0x74, 0x73, 0x52, 0x65, 0x63, 0x76, 0x12, 0x20, 0x0a, 0x0b, 0x70, 0x61, 0x63, 0x6b,
  510. 0x65, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x70,
  511. 0x61, 0x63, 0x6b, 0x65, 0x74, 0x73, 0x53, 0x65, 0x6e, 0x74, 0x22, 0x49, 0x0a, 0x06, 0x43, 0x50,
  512. 0x55, 0x52, 0x65, 0x71, 0x12, 0x25, 0x0a, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01,
  513. 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x53, 0x65, 0x72,
  514. 0x76, 0x65, 0x72, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70,
  515. 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x07, 0x70, 0x65,
  516. 0x72, 0x63, 0x65, 0x6e, 0x74, 0x32, 0xfa, 0x01, 0x0a, 0x06, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74,
  517. 0x12, 0x31, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
  518. 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79,
  519. 0x1a, 0x0f, 0x2e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x50, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
  520. 0x70, 0x22, 0x00, 0x12, 0x2b, 0x0a, 0x04, 0x49, 0x6e, 0x69, 0x74, 0x12, 0x0e, 0x2e, 0x6c, 0x69,
  521. 0x6e, 0x75, 0x78, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6c, 0x69,
  522. 0x6e, 0x75, 0x78, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x73, 0x67, 0x22, 0x00,
  523. 0x12, 0x2f, 0x0a, 0x06, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x10, 0x2e, 0x6c, 0x69, 0x6e,
  524. 0x75, 0x78, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6c,
  525. 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x73, 0x67, 0x22,
  526. 0x00, 0x12, 0x2d, 0x0a, 0x07, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x0d, 0x2e, 0x6c,
  527. 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x4e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e, 0x6c, 0x69,
  528. 0x6e, 0x75, 0x78, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x73, 0x67, 0x22, 0x00,
  529. 0x12, 0x30, 0x0a, 0x0a, 0x43, 0x50, 0x55, 0x50, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x12, 0x0d,
  530. 0x2e, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x43, 0x50, 0x55, 0x52, 0x65, 0x71, 0x1a, 0x11, 0x2e,
  531. 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x2e, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x4d, 0x73, 0x67,
  532. 0x22, 0x00, 0x42, 0x09, 0x5a, 0x07, 0x2e, 0x3b, 0x6c, 0x69, 0x6e, 0x75, 0x78, 0x62, 0x06, 0x70,
  533. 0x72, 0x6f, 0x74, 0x6f, 0x33,
  534. }
  535. var (
  536. file_client_proto_rawDescOnce sync.Once
  537. file_client_proto_rawDescData = file_client_proto_rawDesc
  538. )
  539. func file_client_proto_rawDescGZIP() []byte {
  540. file_client_proto_rawDescOnce.Do(func() {
  541. file_client_proto_rawDescData = protoimpl.X.CompressGZIP(file_client_proto_rawDescData)
  542. })
  543. return file_client_proto_rawDescData
  544. }
  545. var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
  546. var file_client_proto_goTypes = []interface{}{
  547. (*Server)(nil), // 0: linux.Server
  548. (*SuccessMsg)(nil), // 1: linux.SuccessMsg
  549. (*PingResp)(nil), // 2: linux.PingResp
  550. (*InitReq)(nil), // 3: linux.InitReq
  551. (*CPUInit)(nil), // 4: linux.CPUInit
  552. (*MemoryReq)(nil), // 5: linux.MemoryReq
  553. (*NetReq)(nil), // 6: linux.NetReq
  554. (*CPUReq)(nil), // 7: linux.CPUReq
  555. (*empty.Empty)(nil), // 8: google.protobuf.Empty
  556. }
  557. var file_client_proto_depIdxs = []int32{
  558. 0, // 0: linux.InitReq.server:type_name -> linux.Server
  559. 4, // 1: linux.InitReq.CPU:type_name -> linux.CPUInit
  560. 0, // 2: linux.MemoryReq.server:type_name -> linux.Server
  561. 0, // 3: linux.NetReq.server:type_name -> linux.Server
  562. 0, // 4: linux.CPUReq.server:type_name -> linux.Server
  563. 8, // 5: linux.Client.Ping:input_type -> google.protobuf.Empty
  564. 3, // 6: linux.Client.Init:input_type -> linux.InitReq
  565. 5, // 7: linux.Client.Memory:input_type -> linux.MemoryReq
  566. 6, // 8: linux.Client.Network:input_type -> linux.NetReq
  567. 7, // 9: linux.Client.CPUPercent:input_type -> linux.CPUReq
  568. 2, // 10: linux.Client.Ping:output_type -> linux.PingResp
  569. 1, // 11: linux.Client.Init:output_type -> linux.SuccessMsg
  570. 1, // 12: linux.Client.Memory:output_type -> linux.SuccessMsg
  571. 1, // 13: linux.Client.Network:output_type -> linux.SuccessMsg
  572. 1, // 14: linux.Client.CPUPercent:output_type -> linux.SuccessMsg
  573. 10, // [10:15] is the sub-list for method output_type
  574. 5, // [5:10] is the sub-list for method input_type
  575. 5, // [5:5] is the sub-list for extension type_name
  576. 5, // [5:5] is the sub-list for extension extendee
  577. 0, // [0:5] is the sub-list for field type_name
  578. }
  579. func init() { file_client_proto_init() }
  580. func file_client_proto_init() {
  581. if File_client_proto != nil {
  582. return
  583. }
  584. if !protoimpl.UnsafeEnabled {
  585. file_client_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  586. switch v := v.(*Server); i {
  587. case 0:
  588. return &v.state
  589. case 1:
  590. return &v.sizeCache
  591. case 2:
  592. return &v.unknownFields
  593. default:
  594. return nil
  595. }
  596. }
  597. file_client_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
  598. switch v := v.(*SuccessMsg); i {
  599. case 0:
  600. return &v.state
  601. case 1:
  602. return &v.sizeCache
  603. case 2:
  604. return &v.unknownFields
  605. default:
  606. return nil
  607. }
  608. }
  609. file_client_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
  610. switch v := v.(*PingResp); i {
  611. case 0:
  612. return &v.state
  613. case 1:
  614. return &v.sizeCache
  615. case 2:
  616. return &v.unknownFields
  617. default:
  618. return nil
  619. }
  620. }
  621. file_client_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
  622. switch v := v.(*InitReq); i {
  623. case 0:
  624. return &v.state
  625. case 1:
  626. return &v.sizeCache
  627. case 2:
  628. return &v.unknownFields
  629. default:
  630. return nil
  631. }
  632. }
  633. file_client_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
  634. switch v := v.(*CPUInit); i {
  635. case 0:
  636. return &v.state
  637. case 1:
  638. return &v.sizeCache
  639. case 2:
  640. return &v.unknownFields
  641. default:
  642. return nil
  643. }
  644. }
  645. file_client_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
  646. switch v := v.(*MemoryReq); i {
  647. case 0:
  648. return &v.state
  649. case 1:
  650. return &v.sizeCache
  651. case 2:
  652. return &v.unknownFields
  653. default:
  654. return nil
  655. }
  656. }
  657. file_client_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
  658. switch v := v.(*NetReq); i {
  659. case 0:
  660. return &v.state
  661. case 1:
  662. return &v.sizeCache
  663. case 2:
  664. return &v.unknownFields
  665. default:
  666. return nil
  667. }
  668. }
  669. file_client_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
  670. switch v := v.(*CPUReq); i {
  671. case 0:
  672. return &v.state
  673. case 1:
  674. return &v.sizeCache
  675. case 2:
  676. return &v.unknownFields
  677. default:
  678. return nil
  679. }
  680. }
  681. }
  682. type x struct{}
  683. out := protoimpl.TypeBuilder{
  684. File: protoimpl.DescBuilder{
  685. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  686. RawDescriptor: file_client_proto_rawDesc,
  687. NumEnums: 0,
  688. NumMessages: 8,
  689. NumExtensions: 0,
  690. NumServices: 1,
  691. },
  692. GoTypes: file_client_proto_goTypes,
  693. DependencyIndexes: file_client_proto_depIdxs,
  694. MessageInfos: file_client_proto_msgTypes,
  695. }.Build()
  696. File_client_proto = out.File
  697. file_client_proto_rawDesc = nil
  698. file_client_proto_goTypes = nil
  699. file_client_proto_depIdxs = nil
  700. }
  701. // Reference imports to suppress errors if they are not otherwise used.
  702. var _ context.Context
  703. var _ grpc.ClientConnInterface
  704. // This is a compile-time assertion to ensure that this generated file
  705. // is compatible with the grpc package it is being compiled against.
  706. const _ = grpc.SupportPackageIsVersion6
  707. // ClientClient is the client API for Client service.
  708. //
  709. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  710. type ClientClient interface {
  711. Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PingResp, error)
  712. Init(ctx context.Context, in *InitReq, opts ...grpc.CallOption) (*SuccessMsg, error)
  713. Memory(ctx context.Context, in *MemoryReq, opts ...grpc.CallOption) (*SuccessMsg, error)
  714. Network(ctx context.Context, in *NetReq, opts ...grpc.CallOption) (*SuccessMsg, error)
  715. CPUPercent(ctx context.Context, in *CPUReq, opts ...grpc.CallOption) (*SuccessMsg, error)
  716. }
  717. type clientClient struct {
  718. cc grpc.ClientConnInterface
  719. }
  720. func NewClientClient(cc grpc.ClientConnInterface) ClientClient {
  721. return &clientClient{cc}
  722. }
  723. func (c *clientClient) Ping(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*PingResp, error) {
  724. out := new(PingResp)
  725. err := c.cc.Invoke(ctx, "/linux.Client/Ping", in, out, opts...)
  726. if err != nil {
  727. return nil, err
  728. }
  729. return out, nil
  730. }
  731. func (c *clientClient) Init(ctx context.Context, in *InitReq, opts ...grpc.CallOption) (*SuccessMsg, error) {
  732. out := new(SuccessMsg)
  733. err := c.cc.Invoke(ctx, "/linux.Client/Init", in, out, opts...)
  734. if err != nil {
  735. return nil, err
  736. }
  737. return out, nil
  738. }
  739. func (c *clientClient) Memory(ctx context.Context, in *MemoryReq, opts ...grpc.CallOption) (*SuccessMsg, error) {
  740. out := new(SuccessMsg)
  741. err := c.cc.Invoke(ctx, "/linux.Client/Memory", in, out, opts...)
  742. if err != nil {
  743. return nil, err
  744. }
  745. return out, nil
  746. }
  747. func (c *clientClient) Network(ctx context.Context, in *NetReq, opts ...grpc.CallOption) (*SuccessMsg, error) {
  748. out := new(SuccessMsg)
  749. err := c.cc.Invoke(ctx, "/linux.Client/Network", in, out, opts...)
  750. if err != nil {
  751. return nil, err
  752. }
  753. return out, nil
  754. }
  755. func (c *clientClient) CPUPercent(ctx context.Context, in *CPUReq, opts ...grpc.CallOption) (*SuccessMsg, error) {
  756. out := new(SuccessMsg)
  757. err := c.cc.Invoke(ctx, "/linux.Client/CPUPercent", in, out, opts...)
  758. if err != nil {
  759. return nil, err
  760. }
  761. return out, nil
  762. }
  763. // ClientServer is the server API for Client service.
  764. type ClientServer interface {
  765. Ping(context.Context, *empty.Empty) (*PingResp, error)
  766. Init(context.Context, *InitReq) (*SuccessMsg, error)
  767. Memory(context.Context, *MemoryReq) (*SuccessMsg, error)
  768. Network(context.Context, *NetReq) (*SuccessMsg, error)
  769. CPUPercent(context.Context, *CPUReq) (*SuccessMsg, error)
  770. }
  771. // UnimplementedClientServer can be embedded to have forward compatible implementations.
  772. type UnimplementedClientServer struct {
  773. }
  774. func (*UnimplementedClientServer) Ping(context.Context, *empty.Empty) (*PingResp, error) {
  775. return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
  776. }
  777. func (*UnimplementedClientServer) Init(context.Context, *InitReq) (*SuccessMsg, error) {
  778. return nil, status.Errorf(codes.Unimplemented, "method Init not implemented")
  779. }
  780. func (*UnimplementedClientServer) Memory(context.Context, *MemoryReq) (*SuccessMsg, error) {
  781. return nil, status.Errorf(codes.Unimplemented, "method Memory not implemented")
  782. }
  783. func (*UnimplementedClientServer) Network(context.Context, *NetReq) (*SuccessMsg, error) {
  784. return nil, status.Errorf(codes.Unimplemented, "method Network not implemented")
  785. }
  786. func (*UnimplementedClientServer) CPUPercent(context.Context, *CPUReq) (*SuccessMsg, error) {
  787. return nil, status.Errorf(codes.Unimplemented, "method CPUPercent not implemented")
  788. }
  789. func RegisterClientServer(s *grpc.Server, srv ClientServer) {
  790. s.RegisterService(&_Client_serviceDesc, srv)
  791. }
  792. func _Client_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  793. in := new(empty.Empty)
  794. if err := dec(in); err != nil {
  795. return nil, err
  796. }
  797. if interceptor == nil {
  798. return srv.(ClientServer).Ping(ctx, in)
  799. }
  800. info := &grpc.UnaryServerInfo{
  801. Server: srv,
  802. FullMethod: "/linux.Client/Ping",
  803. }
  804. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  805. return srv.(ClientServer).Ping(ctx, req.(*empty.Empty))
  806. }
  807. return interceptor(ctx, in, info, handler)
  808. }
  809. func _Client_Init_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  810. in := new(InitReq)
  811. if err := dec(in); err != nil {
  812. return nil, err
  813. }
  814. if interceptor == nil {
  815. return srv.(ClientServer).Init(ctx, in)
  816. }
  817. info := &grpc.UnaryServerInfo{
  818. Server: srv,
  819. FullMethod: "/linux.Client/Init",
  820. }
  821. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  822. return srv.(ClientServer).Init(ctx, req.(*InitReq))
  823. }
  824. return interceptor(ctx, in, info, handler)
  825. }
  826. func _Client_Memory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  827. in := new(MemoryReq)
  828. if err := dec(in); err != nil {
  829. return nil, err
  830. }
  831. if interceptor == nil {
  832. return srv.(ClientServer).Memory(ctx, in)
  833. }
  834. info := &grpc.UnaryServerInfo{
  835. Server: srv,
  836. FullMethod: "/linux.Client/Memory",
  837. }
  838. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  839. return srv.(ClientServer).Memory(ctx, req.(*MemoryReq))
  840. }
  841. return interceptor(ctx, in, info, handler)
  842. }
  843. func _Client_Network_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  844. in := new(NetReq)
  845. if err := dec(in); err != nil {
  846. return nil, err
  847. }
  848. if interceptor == nil {
  849. return srv.(ClientServer).Network(ctx, in)
  850. }
  851. info := &grpc.UnaryServerInfo{
  852. Server: srv,
  853. FullMethod: "/linux.Client/Network",
  854. }
  855. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  856. return srv.(ClientServer).Network(ctx, req.(*NetReq))
  857. }
  858. return interceptor(ctx, in, info, handler)
  859. }
  860. func _Client_CPUPercent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  861. in := new(CPUReq)
  862. if err := dec(in); err != nil {
  863. return nil, err
  864. }
  865. if interceptor == nil {
  866. return srv.(ClientServer).CPUPercent(ctx, in)
  867. }
  868. info := &grpc.UnaryServerInfo{
  869. Server: srv,
  870. FullMethod: "/linux.Client/CPUPercent",
  871. }
  872. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  873. return srv.(ClientServer).CPUPercent(ctx, req.(*CPUReq))
  874. }
  875. return interceptor(ctx, in, info, handler)
  876. }
  877. var _Client_serviceDesc = grpc.ServiceDesc{
  878. ServiceName: "linux.Client",
  879. HandlerType: (*ClientServer)(nil),
  880. Methods: []grpc.MethodDesc{
  881. {
  882. MethodName: "Ping",
  883. Handler: _Client_Ping_Handler,
  884. },
  885. {
  886. MethodName: "Init",
  887. Handler: _Client_Init_Handler,
  888. },
  889. {
  890. MethodName: "Memory",
  891. Handler: _Client_Memory_Handler,
  892. },
  893. {
  894. MethodName: "Network",
  895. Handler: _Client_Network_Handler,
  896. },
  897. {
  898. MethodName: "CPUPercent",
  899. Handler: _Client_CPUPercent_Handler,
  900. },
  901. },
  902. Streams: []grpc.StreamDesc{},
  903. Metadata: "client.proto",
  904. }