graceful.pb.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. // Code generated by protoc-gen-go.
  2. // source: graceful.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package graceful is a generated protocol buffer package.
  6. It is generated from these files:
  7. graceful.proto
  8. It has these top-level messages:
  9. Request
  10. Response
  11. */
  12. package graceful
  13. import (
  14. "fmt"
  15. "math"
  16. "github.com/golang/protobuf/proto"
  17. "golang.org/x/net/context"
  18. "google.golang.org/grpc"
  19. )
  20. // Reference imports to suppress errors if they are not otherwise used.
  21. var _ = proto.Marshal
  22. var _ = fmt.Errorf
  23. var _ = math.Inf
  24. // This is a compile-time assertion to ensure that this generated file
  25. // is compatible with the proto package it is being compiled against.
  26. // A compilation error at this line likely means your copy of the
  27. // proto package needs to be updated.
  28. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  29. type Request struct {
  30. From string `protobuf:"bytes,1,opt,name=from" json:"from,omitempty"`
  31. }
  32. func (m *Request) Reset() { *m = Request{} }
  33. func (m *Request) String() string { return proto.CompactTextString(m) }
  34. func (*Request) ProtoMessage() {}
  35. func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  36. func (m *Request) GetFrom() string {
  37. if m != nil {
  38. return m.From
  39. }
  40. return ""
  41. }
  42. type Response struct {
  43. Host string `protobuf:"bytes,2,opt,name=host" json:"host,omitempty"`
  44. }
  45. func (m *Response) Reset() { *m = Response{} }
  46. func (m *Response) String() string { return proto.CompactTextString(m) }
  47. func (*Response) ProtoMessage() {}
  48. func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  49. func (m *Response) GetHost() string {
  50. if m != nil {
  51. return m.Host
  52. }
  53. return ""
  54. }
  55. func init() {
  56. proto.RegisterType((*Request)(nil), "graceful.Request")
  57. proto.RegisterType((*Response)(nil), "graceful.Response")
  58. }
  59. // Reference imports to suppress errors if they are not otherwise used.
  60. var _ context.Context
  61. var _ grpc.ClientConn
  62. // This is a compile-time assertion to ensure that this generated file
  63. // is compatible with the grpc package it is being compiled against.
  64. const _ = grpc.SupportPackageIsVersion4
  65. // Client API for GraceService service
  66. type GraceServiceClient interface {
  67. Grace(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
  68. }
  69. type graceServiceClient struct {
  70. cc *grpc.ClientConn
  71. }
  72. func NewGraceServiceClient(cc *grpc.ClientConn) GraceServiceClient {
  73. return &graceServiceClient{cc}
  74. }
  75. func (c *graceServiceClient) Grace(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
  76. out := new(Response)
  77. err := grpc.Invoke(ctx, "/graceful.GraceService/grace", in, out, c.cc, opts...)
  78. if err != nil {
  79. return nil, err
  80. }
  81. return out, nil
  82. }
  83. // Server API for GraceService service
  84. type GraceServiceServer interface {
  85. Grace(context.Context, *Request) (*Response, error)
  86. }
  87. func RegisterGraceServiceServer(s *grpc.Server, srv GraceServiceServer) {
  88. s.RegisterService(&_GraceService_serviceDesc, srv)
  89. }
  90. func _GraceService_Grace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  91. in := new(Request)
  92. if err := dec(in); err != nil {
  93. return nil, err
  94. }
  95. if interceptor == nil {
  96. return srv.(GraceServiceServer).Grace(ctx, in)
  97. }
  98. info := &grpc.UnaryServerInfo{
  99. Server: srv,
  100. FullMethod: "/graceful.GraceService/Grace",
  101. }
  102. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  103. return srv.(GraceServiceServer).Grace(ctx, req.(*Request))
  104. }
  105. return interceptor(ctx, in, info, handler)
  106. }
  107. var _GraceService_serviceDesc = grpc.ServiceDesc{
  108. ServiceName: "graceful.GraceService",
  109. HandlerType: (*GraceServiceServer)(nil),
  110. Methods: []grpc.MethodDesc{
  111. {
  112. MethodName: "grace",
  113. Handler: _GraceService_Grace_Handler,
  114. },
  115. },
  116. Streams: []grpc.StreamDesc{},
  117. Metadata: "graceful.proto",
  118. }
  119. func init() { proto.RegisterFile("graceful.proto", fileDescriptor0) }
  120. var fileDescriptor0 = []byte{
  121. // 134 bytes of a gzipped FileDescriptorProto
  122. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x4b, 0x2f, 0x4a, 0x4c,
  123. 0x4e, 0x4d, 0x2b, 0xcd, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x80, 0xf1, 0x95, 0x64,
  124. 0xb9, 0xd8, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0x84, 0x84, 0xb8, 0x58, 0xd2, 0x8a, 0xf2,
  125. 0x73, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x25, 0x39, 0x2e, 0x8e, 0xa0, 0xd4,
  126. 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x90, 0x7c, 0x46, 0x7e, 0x71, 0x89, 0x04, 0x13, 0x44, 0x1e,
  127. 0xc4, 0x36, 0xb2, 0xe3, 0xe2, 0x71, 0x07, 0x19, 0x15, 0x9c, 0x5a, 0x54, 0x96, 0x99, 0x9c, 0x2a,
  128. 0xa4, 0xc7, 0xc5, 0x0a, 0x36, 0x5a, 0x48, 0x50, 0x0f, 0x6e, 0x25, 0xd4, 0x7c, 0x29, 0x21, 0x64,
  129. 0x21, 0x88, 0x99, 0x49, 0x6c, 0x60, 0xf7, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x81, 0x87,
  130. 0xc8, 0xc1, 0xa1, 0x00, 0x00, 0x00,
  131. }