health.pb.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721
  1. // Code generated by protoc-gen-gogo.
  2. // source: health.proto
  3. // DO NOT EDIT!
  4. package api
  5. import proto "github.com/gogo/protobuf/proto"
  6. import fmt "fmt"
  7. import math "math"
  8. import _ "github.com/gogo/protobuf/gogoproto"
  9. import _ "github.com/docker/swarmkit/protobuf/plugin"
  10. import (
  11. context "golang.org/x/net/context"
  12. grpc "google.golang.org/grpc"
  13. )
  14. import raftselector "github.com/docker/swarmkit/manager/raftselector"
  15. import codes "google.golang.org/grpc/codes"
  16. import metadata "google.golang.org/grpc/metadata"
  17. import transport "google.golang.org/grpc/transport"
  18. import rafttime "time"
  19. import strings "strings"
  20. import reflect "reflect"
  21. import io "io"
  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. type HealthCheckResponse_ServingStatus int32
  27. const (
  28. HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0
  29. HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1
  30. HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2
  31. )
  32. var HealthCheckResponse_ServingStatus_name = map[int32]string{
  33. 0: "UNKNOWN",
  34. 1: "SERVING",
  35. 2: "NOT_SERVING",
  36. }
  37. var HealthCheckResponse_ServingStatus_value = map[string]int32{
  38. "UNKNOWN": 0,
  39. "SERVING": 1,
  40. "NOT_SERVING": 2,
  41. }
  42. func (x HealthCheckResponse_ServingStatus) String() string {
  43. return proto.EnumName(HealthCheckResponse_ServingStatus_name, int32(x))
  44. }
  45. func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) {
  46. return fileDescriptorHealth, []int{1, 0}
  47. }
  48. type HealthCheckRequest struct {
  49. Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
  50. }
  51. func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} }
  52. func (*HealthCheckRequest) ProtoMessage() {}
  53. func (*HealthCheckRequest) Descriptor() ([]byte, []int) { return fileDescriptorHealth, []int{0} }
  54. type HealthCheckResponse struct {
  55. Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,proto3,enum=docker.swarmkit.v1.HealthCheckResponse_ServingStatus" json:"status,omitempty"`
  56. }
  57. func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} }
  58. func (*HealthCheckResponse) ProtoMessage() {}
  59. func (*HealthCheckResponse) Descriptor() ([]byte, []int) { return fileDescriptorHealth, []int{1} }
  60. func init() {
  61. proto.RegisterType((*HealthCheckRequest)(nil), "docker.swarmkit.v1.HealthCheckRequest")
  62. proto.RegisterType((*HealthCheckResponse)(nil), "docker.swarmkit.v1.HealthCheckResponse")
  63. proto.RegisterEnum("docker.swarmkit.v1.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value)
  64. }
  65. type authenticatedWrapperHealthServer struct {
  66. local HealthServer
  67. authorize func(context.Context, []string) error
  68. }
  69. func NewAuthenticatedWrapperHealthServer(local HealthServer, authorize func(context.Context, []string) error) HealthServer {
  70. return &authenticatedWrapperHealthServer{
  71. local: local,
  72. authorize: authorize,
  73. }
  74. }
  75. func (p *authenticatedWrapperHealthServer) Check(ctx context.Context, r *HealthCheckRequest) (*HealthCheckResponse, error) {
  76. if err := p.authorize(ctx, []string{"swarm-manager"}); err != nil {
  77. return nil, err
  78. }
  79. return p.local.Check(ctx, r)
  80. }
  81. func (m *HealthCheckRequest) Copy() *HealthCheckRequest {
  82. if m == nil {
  83. return nil
  84. }
  85. o := &HealthCheckRequest{}
  86. o.CopyFrom(m)
  87. return o
  88. }
  89. func (m *HealthCheckRequest) CopyFrom(src interface{}) {
  90. o := src.(*HealthCheckRequest)
  91. *m = *o
  92. }
  93. func (m *HealthCheckResponse) Copy() *HealthCheckResponse {
  94. if m == nil {
  95. return nil
  96. }
  97. o := &HealthCheckResponse{}
  98. o.CopyFrom(m)
  99. return o
  100. }
  101. func (m *HealthCheckResponse) CopyFrom(src interface{}) {
  102. o := src.(*HealthCheckResponse)
  103. *m = *o
  104. }
  105. // Reference imports to suppress errors if they are not otherwise used.
  106. var _ context.Context
  107. var _ grpc.ClientConn
  108. // This is a compile-time assertion to ensure that this generated file
  109. // is compatible with the grpc package it is being compiled against.
  110. const _ = grpc.SupportPackageIsVersion4
  111. // Client API for Health service
  112. type HealthClient interface {
  113. Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error)
  114. }
  115. type healthClient struct {
  116. cc *grpc.ClientConn
  117. }
  118. func NewHealthClient(cc *grpc.ClientConn) HealthClient {
  119. return &healthClient{cc}
  120. }
  121. func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) {
  122. out := new(HealthCheckResponse)
  123. err := grpc.Invoke(ctx, "/docker.swarmkit.v1.Health/Check", in, out, c.cc, opts...)
  124. if err != nil {
  125. return nil, err
  126. }
  127. return out, nil
  128. }
  129. // Server API for Health service
  130. type HealthServer interface {
  131. Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error)
  132. }
  133. func RegisterHealthServer(s *grpc.Server, srv HealthServer) {
  134. s.RegisterService(&_Health_serviceDesc, srv)
  135. }
  136. func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  137. in := new(HealthCheckRequest)
  138. if err := dec(in); err != nil {
  139. return nil, err
  140. }
  141. if interceptor == nil {
  142. return srv.(HealthServer).Check(ctx, in)
  143. }
  144. info := &grpc.UnaryServerInfo{
  145. Server: srv,
  146. FullMethod: "/docker.swarmkit.v1.Health/Check",
  147. }
  148. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  149. return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest))
  150. }
  151. return interceptor(ctx, in, info, handler)
  152. }
  153. var _Health_serviceDesc = grpc.ServiceDesc{
  154. ServiceName: "docker.swarmkit.v1.Health",
  155. HandlerType: (*HealthServer)(nil),
  156. Methods: []grpc.MethodDesc{
  157. {
  158. MethodName: "Check",
  159. Handler: _Health_Check_Handler,
  160. },
  161. },
  162. Streams: []grpc.StreamDesc{},
  163. Metadata: "health.proto",
  164. }
  165. func (m *HealthCheckRequest) Marshal() (dAtA []byte, err error) {
  166. size := m.Size()
  167. dAtA = make([]byte, size)
  168. n, err := m.MarshalTo(dAtA)
  169. if err != nil {
  170. return nil, err
  171. }
  172. return dAtA[:n], nil
  173. }
  174. func (m *HealthCheckRequest) MarshalTo(dAtA []byte) (int, error) {
  175. var i int
  176. _ = i
  177. var l int
  178. _ = l
  179. if len(m.Service) > 0 {
  180. dAtA[i] = 0xa
  181. i++
  182. i = encodeVarintHealth(dAtA, i, uint64(len(m.Service)))
  183. i += copy(dAtA[i:], m.Service)
  184. }
  185. return i, nil
  186. }
  187. func (m *HealthCheckResponse) Marshal() (dAtA []byte, err error) {
  188. size := m.Size()
  189. dAtA = make([]byte, size)
  190. n, err := m.MarshalTo(dAtA)
  191. if err != nil {
  192. return nil, err
  193. }
  194. return dAtA[:n], nil
  195. }
  196. func (m *HealthCheckResponse) MarshalTo(dAtA []byte) (int, error) {
  197. var i int
  198. _ = i
  199. var l int
  200. _ = l
  201. if m.Status != 0 {
  202. dAtA[i] = 0x8
  203. i++
  204. i = encodeVarintHealth(dAtA, i, uint64(m.Status))
  205. }
  206. return i, nil
  207. }
  208. func encodeFixed64Health(dAtA []byte, offset int, v uint64) int {
  209. dAtA[offset] = uint8(v)
  210. dAtA[offset+1] = uint8(v >> 8)
  211. dAtA[offset+2] = uint8(v >> 16)
  212. dAtA[offset+3] = uint8(v >> 24)
  213. dAtA[offset+4] = uint8(v >> 32)
  214. dAtA[offset+5] = uint8(v >> 40)
  215. dAtA[offset+6] = uint8(v >> 48)
  216. dAtA[offset+7] = uint8(v >> 56)
  217. return offset + 8
  218. }
  219. func encodeFixed32Health(dAtA []byte, offset int, v uint32) int {
  220. dAtA[offset] = uint8(v)
  221. dAtA[offset+1] = uint8(v >> 8)
  222. dAtA[offset+2] = uint8(v >> 16)
  223. dAtA[offset+3] = uint8(v >> 24)
  224. return offset + 4
  225. }
  226. func encodeVarintHealth(dAtA []byte, offset int, v uint64) int {
  227. for v >= 1<<7 {
  228. dAtA[offset] = uint8(v&0x7f | 0x80)
  229. v >>= 7
  230. offset++
  231. }
  232. dAtA[offset] = uint8(v)
  233. return offset + 1
  234. }
  235. type raftProxyHealthServer struct {
  236. local HealthServer
  237. connSelector raftselector.ConnProvider
  238. localCtxMods, remoteCtxMods []func(context.Context) (context.Context, error)
  239. }
  240. func NewRaftProxyHealthServer(local HealthServer, connSelector raftselector.ConnProvider, localCtxMod, remoteCtxMod func(context.Context) (context.Context, error)) HealthServer {
  241. redirectChecker := func(ctx context.Context) (context.Context, error) {
  242. s, ok := transport.StreamFromContext(ctx)
  243. if !ok {
  244. return ctx, grpc.Errorf(codes.InvalidArgument, "remote addr is not found in context")
  245. }
  246. addr := s.ServerTransport().RemoteAddr().String()
  247. md, ok := metadata.FromContext(ctx)
  248. if ok && len(md["redirect"]) != 0 {
  249. return ctx, grpc.Errorf(codes.ResourceExhausted, "more than one redirect to leader from: %s", md["redirect"])
  250. }
  251. if !ok {
  252. md = metadata.New(map[string]string{})
  253. }
  254. md["redirect"] = append(md["redirect"], addr)
  255. return metadata.NewContext(ctx, md), nil
  256. }
  257. remoteMods := []func(context.Context) (context.Context, error){redirectChecker}
  258. remoteMods = append(remoteMods, remoteCtxMod)
  259. var localMods []func(context.Context) (context.Context, error)
  260. if localCtxMod != nil {
  261. localMods = []func(context.Context) (context.Context, error){localCtxMod}
  262. }
  263. return &raftProxyHealthServer{
  264. local: local,
  265. connSelector: connSelector,
  266. localCtxMods: localMods,
  267. remoteCtxMods: remoteMods,
  268. }
  269. }
  270. func (p *raftProxyHealthServer) runCtxMods(ctx context.Context, ctxMods []func(context.Context) (context.Context, error)) (context.Context, error) {
  271. var err error
  272. for _, mod := range ctxMods {
  273. ctx, err = mod(ctx)
  274. if err != nil {
  275. return ctx, err
  276. }
  277. }
  278. return ctx, nil
  279. }
  280. func (p *raftProxyHealthServer) pollNewLeaderConn(ctx context.Context) (*grpc.ClientConn, error) {
  281. ticker := rafttime.NewTicker(500 * rafttime.Millisecond)
  282. defer ticker.Stop()
  283. for {
  284. select {
  285. case <-ticker.C:
  286. conn, err := p.connSelector.LeaderConn(ctx)
  287. if err != nil {
  288. return nil, err
  289. }
  290. client := NewHealthClient(conn)
  291. resp, err := client.Check(ctx, &HealthCheckRequest{Service: "Raft"})
  292. if err != nil || resp.Status != HealthCheckResponse_SERVING {
  293. continue
  294. }
  295. return conn, nil
  296. case <-ctx.Done():
  297. return nil, ctx.Err()
  298. }
  299. }
  300. }
  301. func (p *raftProxyHealthServer) Check(ctx context.Context, r *HealthCheckRequest) (*HealthCheckResponse, error) {
  302. conn, err := p.connSelector.LeaderConn(ctx)
  303. if err != nil {
  304. if err == raftselector.ErrIsLeader {
  305. ctx, err = p.runCtxMods(ctx, p.localCtxMods)
  306. if err != nil {
  307. return nil, err
  308. }
  309. return p.local.Check(ctx, r)
  310. }
  311. return nil, err
  312. }
  313. modCtx, err := p.runCtxMods(ctx, p.remoteCtxMods)
  314. if err != nil {
  315. return nil, err
  316. }
  317. resp, err := NewHealthClient(conn).Check(modCtx, r)
  318. if err != nil {
  319. if !strings.Contains(err.Error(), "is closing") && !strings.Contains(err.Error(), "the connection is unavailable") && !strings.Contains(err.Error(), "connection error") {
  320. return resp, err
  321. }
  322. conn, err := p.pollNewLeaderConn(ctx)
  323. if err != nil {
  324. if err == raftselector.ErrIsLeader {
  325. return p.local.Check(ctx, r)
  326. }
  327. return nil, err
  328. }
  329. return NewHealthClient(conn).Check(modCtx, r)
  330. }
  331. return resp, err
  332. }
  333. func (m *HealthCheckRequest) Size() (n int) {
  334. var l int
  335. _ = l
  336. l = len(m.Service)
  337. if l > 0 {
  338. n += 1 + l + sovHealth(uint64(l))
  339. }
  340. return n
  341. }
  342. func (m *HealthCheckResponse) Size() (n int) {
  343. var l int
  344. _ = l
  345. if m.Status != 0 {
  346. n += 1 + sovHealth(uint64(m.Status))
  347. }
  348. return n
  349. }
  350. func sovHealth(x uint64) (n int) {
  351. for {
  352. n++
  353. x >>= 7
  354. if x == 0 {
  355. break
  356. }
  357. }
  358. return n
  359. }
  360. func sozHealth(x uint64) (n int) {
  361. return sovHealth(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  362. }
  363. func (this *HealthCheckRequest) String() string {
  364. if this == nil {
  365. return "nil"
  366. }
  367. s := strings.Join([]string{`&HealthCheckRequest{`,
  368. `Service:` + fmt.Sprintf("%v", this.Service) + `,`,
  369. `}`,
  370. }, "")
  371. return s
  372. }
  373. func (this *HealthCheckResponse) String() string {
  374. if this == nil {
  375. return "nil"
  376. }
  377. s := strings.Join([]string{`&HealthCheckResponse{`,
  378. `Status:` + fmt.Sprintf("%v", this.Status) + `,`,
  379. `}`,
  380. }, "")
  381. return s
  382. }
  383. func valueToStringHealth(v interface{}) string {
  384. rv := reflect.ValueOf(v)
  385. if rv.IsNil() {
  386. return "nil"
  387. }
  388. pv := reflect.Indirect(rv).Interface()
  389. return fmt.Sprintf("*%v", pv)
  390. }
  391. func (m *HealthCheckRequest) Unmarshal(dAtA []byte) error {
  392. l := len(dAtA)
  393. iNdEx := 0
  394. for iNdEx < l {
  395. preIndex := iNdEx
  396. var wire uint64
  397. for shift := uint(0); ; shift += 7 {
  398. if shift >= 64 {
  399. return ErrIntOverflowHealth
  400. }
  401. if iNdEx >= l {
  402. return io.ErrUnexpectedEOF
  403. }
  404. b := dAtA[iNdEx]
  405. iNdEx++
  406. wire |= (uint64(b) & 0x7F) << shift
  407. if b < 0x80 {
  408. break
  409. }
  410. }
  411. fieldNum := int32(wire >> 3)
  412. wireType := int(wire & 0x7)
  413. if wireType == 4 {
  414. return fmt.Errorf("proto: HealthCheckRequest: wiretype end group for non-group")
  415. }
  416. if fieldNum <= 0 {
  417. return fmt.Errorf("proto: HealthCheckRequest: illegal tag %d (wire type %d)", fieldNum, wire)
  418. }
  419. switch fieldNum {
  420. case 1:
  421. if wireType != 2 {
  422. return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType)
  423. }
  424. var stringLen uint64
  425. for shift := uint(0); ; shift += 7 {
  426. if shift >= 64 {
  427. return ErrIntOverflowHealth
  428. }
  429. if iNdEx >= l {
  430. return io.ErrUnexpectedEOF
  431. }
  432. b := dAtA[iNdEx]
  433. iNdEx++
  434. stringLen |= (uint64(b) & 0x7F) << shift
  435. if b < 0x80 {
  436. break
  437. }
  438. }
  439. intStringLen := int(stringLen)
  440. if intStringLen < 0 {
  441. return ErrInvalidLengthHealth
  442. }
  443. postIndex := iNdEx + intStringLen
  444. if postIndex > l {
  445. return io.ErrUnexpectedEOF
  446. }
  447. m.Service = string(dAtA[iNdEx:postIndex])
  448. iNdEx = postIndex
  449. default:
  450. iNdEx = preIndex
  451. skippy, err := skipHealth(dAtA[iNdEx:])
  452. if err != nil {
  453. return err
  454. }
  455. if skippy < 0 {
  456. return ErrInvalidLengthHealth
  457. }
  458. if (iNdEx + skippy) > l {
  459. return io.ErrUnexpectedEOF
  460. }
  461. iNdEx += skippy
  462. }
  463. }
  464. if iNdEx > l {
  465. return io.ErrUnexpectedEOF
  466. }
  467. return nil
  468. }
  469. func (m *HealthCheckResponse) Unmarshal(dAtA []byte) error {
  470. l := len(dAtA)
  471. iNdEx := 0
  472. for iNdEx < l {
  473. preIndex := iNdEx
  474. var wire uint64
  475. for shift := uint(0); ; shift += 7 {
  476. if shift >= 64 {
  477. return ErrIntOverflowHealth
  478. }
  479. if iNdEx >= l {
  480. return io.ErrUnexpectedEOF
  481. }
  482. b := dAtA[iNdEx]
  483. iNdEx++
  484. wire |= (uint64(b) & 0x7F) << shift
  485. if b < 0x80 {
  486. break
  487. }
  488. }
  489. fieldNum := int32(wire >> 3)
  490. wireType := int(wire & 0x7)
  491. if wireType == 4 {
  492. return fmt.Errorf("proto: HealthCheckResponse: wiretype end group for non-group")
  493. }
  494. if fieldNum <= 0 {
  495. return fmt.Errorf("proto: HealthCheckResponse: illegal tag %d (wire type %d)", fieldNum, wire)
  496. }
  497. switch fieldNum {
  498. case 1:
  499. if wireType != 0 {
  500. return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  501. }
  502. m.Status = 0
  503. for shift := uint(0); ; shift += 7 {
  504. if shift >= 64 {
  505. return ErrIntOverflowHealth
  506. }
  507. if iNdEx >= l {
  508. return io.ErrUnexpectedEOF
  509. }
  510. b := dAtA[iNdEx]
  511. iNdEx++
  512. m.Status |= (HealthCheckResponse_ServingStatus(b) & 0x7F) << shift
  513. if b < 0x80 {
  514. break
  515. }
  516. }
  517. default:
  518. iNdEx = preIndex
  519. skippy, err := skipHealth(dAtA[iNdEx:])
  520. if err != nil {
  521. return err
  522. }
  523. if skippy < 0 {
  524. return ErrInvalidLengthHealth
  525. }
  526. if (iNdEx + skippy) > l {
  527. return io.ErrUnexpectedEOF
  528. }
  529. iNdEx += skippy
  530. }
  531. }
  532. if iNdEx > l {
  533. return io.ErrUnexpectedEOF
  534. }
  535. return nil
  536. }
  537. func skipHealth(dAtA []byte) (n int, err error) {
  538. l := len(dAtA)
  539. iNdEx := 0
  540. for iNdEx < l {
  541. var wire uint64
  542. for shift := uint(0); ; shift += 7 {
  543. if shift >= 64 {
  544. return 0, ErrIntOverflowHealth
  545. }
  546. if iNdEx >= l {
  547. return 0, io.ErrUnexpectedEOF
  548. }
  549. b := dAtA[iNdEx]
  550. iNdEx++
  551. wire |= (uint64(b) & 0x7F) << shift
  552. if b < 0x80 {
  553. break
  554. }
  555. }
  556. wireType := int(wire & 0x7)
  557. switch wireType {
  558. case 0:
  559. for shift := uint(0); ; shift += 7 {
  560. if shift >= 64 {
  561. return 0, ErrIntOverflowHealth
  562. }
  563. if iNdEx >= l {
  564. return 0, io.ErrUnexpectedEOF
  565. }
  566. iNdEx++
  567. if dAtA[iNdEx-1] < 0x80 {
  568. break
  569. }
  570. }
  571. return iNdEx, nil
  572. case 1:
  573. iNdEx += 8
  574. return iNdEx, nil
  575. case 2:
  576. var length int
  577. for shift := uint(0); ; shift += 7 {
  578. if shift >= 64 {
  579. return 0, ErrIntOverflowHealth
  580. }
  581. if iNdEx >= l {
  582. return 0, io.ErrUnexpectedEOF
  583. }
  584. b := dAtA[iNdEx]
  585. iNdEx++
  586. length |= (int(b) & 0x7F) << shift
  587. if b < 0x80 {
  588. break
  589. }
  590. }
  591. iNdEx += length
  592. if length < 0 {
  593. return 0, ErrInvalidLengthHealth
  594. }
  595. return iNdEx, nil
  596. case 3:
  597. for {
  598. var innerWire uint64
  599. var start int = iNdEx
  600. for shift := uint(0); ; shift += 7 {
  601. if shift >= 64 {
  602. return 0, ErrIntOverflowHealth
  603. }
  604. if iNdEx >= l {
  605. return 0, io.ErrUnexpectedEOF
  606. }
  607. b := dAtA[iNdEx]
  608. iNdEx++
  609. innerWire |= (uint64(b) & 0x7F) << shift
  610. if b < 0x80 {
  611. break
  612. }
  613. }
  614. innerWireType := int(innerWire & 0x7)
  615. if innerWireType == 4 {
  616. break
  617. }
  618. next, err := skipHealth(dAtA[start:])
  619. if err != nil {
  620. return 0, err
  621. }
  622. iNdEx = start + next
  623. }
  624. return iNdEx, nil
  625. case 4:
  626. return iNdEx, nil
  627. case 5:
  628. iNdEx += 4
  629. return iNdEx, nil
  630. default:
  631. return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  632. }
  633. }
  634. panic("unreachable")
  635. }
  636. var (
  637. ErrInvalidLengthHealth = fmt.Errorf("proto: negative length found during unmarshaling")
  638. ErrIntOverflowHealth = fmt.Errorf("proto: integer overflow")
  639. )
  640. func init() { proto.RegisterFile("health.proto", fileDescriptorHealth) }
  641. var fileDescriptorHealth = []byte{
  642. // 287 bytes of a gzipped FileDescriptorProto
  643. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xc9, 0x48, 0x4d, 0xcc,
  644. 0x29, 0xc9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4a, 0xc9, 0x4f, 0xce, 0x4e, 0x2d,
  645. 0xd2, 0x2b, 0x2e, 0x4f, 0x2c, 0xca, 0xcd, 0xce, 0x2c, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf,
  646. 0x4f, 0xcf, 0x07, 0x4b, 0xeb, 0x83, 0x58, 0x10, 0x95, 0x52, 0xc2, 0x05, 0x39, 0xa5, 0xe9, 0x99,
  647. 0x79, 0xfa, 0x10, 0x0a, 0x22, 0xa8, 0xa4, 0xc7, 0x25, 0xe4, 0x01, 0x36, 0xce, 0x39, 0x23, 0x35,
  648. 0x39, 0x3b, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x82, 0x8b, 0xbd, 0x38, 0xb5, 0xa8,
  649. 0x2c, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x55, 0x5a, 0xc0, 0xc8,
  650. 0x25, 0x8c, 0xa2, 0xa1, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, 0x97, 0x8b, 0xad, 0xb8, 0x24,
  651. 0xb1, 0xa4, 0xb4, 0x18, 0xac, 0x81, 0xcf, 0xc8, 0x54, 0x0f, 0xd3, 0x5d, 0x7a, 0x58, 0x34, 0xea,
  652. 0x05, 0x83, 0x0c, 0xce, 0x4b, 0x0f, 0x06, 0x6b, 0x0e, 0x82, 0x1a, 0xa2, 0x64, 0xc5, 0xc5, 0x8b,
  653. 0x22, 0x21, 0xc4, 0xcd, 0xc5, 0x1e, 0xea, 0xe7, 0xed, 0xe7, 0x1f, 0xee, 0x27, 0xc0, 0x00, 0xe2,
  654. 0x04, 0xbb, 0x06, 0x85, 0x79, 0xfa, 0xb9, 0x0b, 0x30, 0x0a, 0xf1, 0x73, 0x71, 0xfb, 0xf9, 0x87,
  655. 0xc4, 0xc3, 0x04, 0x98, 0x8c, 0x2a, 0xb9, 0xd8, 0x20, 0x16, 0x09, 0xe5, 0x73, 0xb1, 0x82, 0x2d,
  656. 0x13, 0x52, 0x23, 0xe8, 0x1a, 0xb0, 0xbf, 0xa5, 0xd4, 0x89, 0x74, 0xb5, 0x92, 0xe8, 0xa9, 0x75,
  657. 0xef, 0x66, 0x30, 0xf1, 0x73, 0xf1, 0x82, 0x15, 0xea, 0xe6, 0x26, 0xe6, 0x25, 0xa6, 0xa7, 0x16,
  658. 0x39, 0x49, 0x9c, 0x78, 0x28, 0xc7, 0x70, 0xe3, 0xa1, 0x1c, 0x43, 0xc3, 0x23, 0x39, 0xc6, 0x13,
  659. 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x89, 0x0d, 0x1c, 0xdc,
  660. 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x59, 0xcd, 0x52, 0xee, 0xbd, 0x01, 0x00, 0x00,
  661. }