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.
 
 
 

165 line
5.3 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: helloworld.proto
  3. /*
  4. Package helloworld is a generated protocol buffer package.
  5. It is generated from these files:
  6. helloworld.proto
  7. It has these top-level messages:
  8. HelloRequest
  9. HelloReply
  10. */
  11. package helloworld // import "go.opencensus.io/examples/grpc/proto"
  12. import proto "github.com/golang/protobuf/proto"
  13. import fmt "fmt"
  14. import math "math"
  15. import (
  16. context "golang.org/x/net/context"
  17. grpc "google.golang.org/grpc"
  18. )
  19. // Reference imports to suppress errors if they are not otherwise used.
  20. var _ = proto.Marshal
  21. var _ = fmt.Errorf
  22. var _ = math.Inf
  23. // This is a compile-time assertion to ensure that this generated file
  24. // is compatible with the proto package it is being compiled against.
  25. // A compilation error at this line likely means your copy of the
  26. // proto package needs to be updated.
  27. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  28. // The request message containing the user's name.
  29. type HelloRequest struct {
  30. Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
  31. }
  32. func (m *HelloRequest) Reset() { *m = HelloRequest{} }
  33. func (m *HelloRequest) String() string { return proto.CompactTextString(m) }
  34. func (*HelloRequest) ProtoMessage() {}
  35. func (*HelloRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
  36. func (m *HelloRequest) GetName() string {
  37. if m != nil {
  38. return m.Name
  39. }
  40. return ""
  41. }
  42. // The response message containing the greetings
  43. type HelloReply struct {
  44. Message string `protobuf:"bytes,1,opt,name=message" json:"message,omitempty"`
  45. }
  46. func (m *HelloReply) Reset() { *m = HelloReply{} }
  47. func (m *HelloReply) String() string { return proto.CompactTextString(m) }
  48. func (*HelloReply) ProtoMessage() {}
  49. func (*HelloReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
  50. func (m *HelloReply) GetMessage() string {
  51. if m != nil {
  52. return m.Message
  53. }
  54. return ""
  55. }
  56. func init() {
  57. proto.RegisterType((*HelloRequest)(nil), "helloworld.HelloRequest")
  58. proto.RegisterType((*HelloReply)(nil), "helloworld.HelloReply")
  59. }
  60. // Reference imports to suppress errors if they are not otherwise used.
  61. var _ context.Context
  62. var _ grpc.ClientConn
  63. // This is a compile-time assertion to ensure that this generated file
  64. // is compatible with the grpc package it is being compiled against.
  65. const _ = grpc.SupportPackageIsVersion4
  66. // Client API for Greeter service
  67. type GreeterClient interface {
  68. // Sends a greeting
  69. SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
  70. }
  71. type greeterClient struct {
  72. cc *grpc.ClientConn
  73. }
  74. func NewGreeterClient(cc *grpc.ClientConn) GreeterClient {
  75. return &greeterClient{cc}
  76. }
  77. func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
  78. out := new(HelloReply)
  79. err := grpc.Invoke(ctx, "/helloworld.Greeter/SayHello", in, out, c.cc, opts...)
  80. if err != nil {
  81. return nil, err
  82. }
  83. return out, nil
  84. }
  85. // Server API for Greeter service
  86. type GreeterServer interface {
  87. // Sends a greeting
  88. SayHello(context.Context, *HelloRequest) (*HelloReply, error)
  89. }
  90. func RegisterGreeterServer(s *grpc.Server, srv GreeterServer) {
  91. s.RegisterService(&_Greeter_serviceDesc, srv)
  92. }
  93. func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  94. in := new(HelloRequest)
  95. if err := dec(in); err != nil {
  96. return nil, err
  97. }
  98. if interceptor == nil {
  99. return srv.(GreeterServer).SayHello(ctx, in)
  100. }
  101. info := &grpc.UnaryServerInfo{
  102. Server: srv,
  103. FullMethod: "/helloworld.Greeter/SayHello",
  104. }
  105. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  106. return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest))
  107. }
  108. return interceptor(ctx, in, info, handler)
  109. }
  110. var _Greeter_serviceDesc = grpc.ServiceDesc{
  111. ServiceName: "helloworld.Greeter",
  112. HandlerType: (*GreeterServer)(nil),
  113. Methods: []grpc.MethodDesc{
  114. {
  115. MethodName: "SayHello",
  116. Handler: _Greeter_SayHello_Handler,
  117. },
  118. },
  119. Streams: []grpc.StreamDesc{},
  120. Metadata: "helloworld.proto",
  121. }
  122. func init() { proto.RegisterFile("helloworld.proto", fileDescriptor0) }
  123. var fileDescriptor0 = []byte{
  124. // 175 bytes of a gzipped FileDescriptorProto
  125. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0x48, 0xcd, 0xc9,
  126. 0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88,
  127. 0x28, 0x29, 0x71, 0xf1, 0x78, 0x80, 0x78, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x42,
  128. 0x5c, 0x2c, 0x79, 0x89, 0xb9, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0xb6, 0x92,
  129. 0x1a, 0x17, 0x17, 0x54, 0x4d, 0x41, 0x4e, 0xa5, 0x90, 0x04, 0x17, 0x7b, 0x6e, 0x6a, 0x71, 0x71,
  130. 0x62, 0x3a, 0x4c, 0x11, 0x8c, 0x6b, 0xe4, 0xc9, 0xc5, 0xee, 0x5e, 0x94, 0x9a, 0x5a, 0x92, 0x5a,
  131. 0x24, 0x64, 0xc7, 0xc5, 0x11, 0x9c, 0x58, 0x09, 0xd6, 0x25, 0x24, 0xa1, 0x87, 0xe4, 0x02, 0x64,
  132. 0xcb, 0xa4, 0xc4, 0xb0, 0xc8, 0x14, 0xe4, 0x54, 0x2a, 0x31, 0x38, 0x19, 0x70, 0x49, 0x67, 0xe6,
  133. 0xeb, 0xa5, 0x17, 0x15, 0x24, 0xeb, 0xa5, 0x56, 0x24, 0xe6, 0x16, 0xe4, 0xa4, 0x16, 0x23, 0xa9,
  134. 0x75, 0xe2, 0x07, 0x2b, 0x0e, 0x07, 0xb1, 0x03, 0x40, 0x5e, 0x0a, 0x60, 0x4c, 0x62, 0x03, 0xfb,
  135. 0xcd, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x0f, 0xb7, 0xcd, 0xf2, 0xef, 0x00, 0x00, 0x00,
  136. }