github.com/brownsys/tracing-framework-go@v0.0.0-20161210174012-0542a62412fe/xtrace/grpc/example/op.pb.go (about)

     1  // Code generated by protoc-gen-go.
     2  // source: op.proto
     3  // DO NOT EDIT!
     4  
     5  /*
     6  Package main is a generated protocol buffer package.
     7  
     8  It is generated from these files:
     9  	op.proto
    10  
    11  It has these top-level messages:
    12  	Int
    13  */
    14  package main
    15  
    16  import proto "github.com/golang/protobuf/proto"
    17  import fmt "fmt"
    18  import math "math"
    19  
    20  import (
    21  	xtgrpc "github.com/brownsys/tracing-framework-go/xtrace/grpc"
    22  	context "golang.org/x/net/context"
    23  	grpc "google.golang.org/grpc"
    24  )
    25  
    26  // Reference imports to suppress errors if they are not otherwise used.
    27  var _ = proto.Marshal
    28  var _ = fmt.Errorf
    29  var _ = math.Inf
    30  
    31  // This is a compile-time assertion to ensure that this generated file
    32  // is compatible with the proto package it is being compiled against.
    33  // A compilation error at this line likely means your copy of the
    34  // proto package needs to be updated.
    35  const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
    36  
    37  type Int struct {
    38  	Num int64 `protobuf:"varint,1,opt,name=num" json:"num,omitempty"`
    39  }
    40  
    41  func (m *Int) Reset()                    { *m = Int{} }
    42  func (m *Int) String() string            { return proto.CompactTextString(m) }
    43  func (*Int) ProtoMessage()               {}
    44  func (*Int) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
    45  
    46  func init() {
    47  	proto.RegisterType((*Int)(nil), "main.Int")
    48  }
    49  
    50  // Reference imports to suppress errors if they are not otherwise used.
    51  var _ context.Context
    52  var _ grpc.ClientConn
    53  
    54  // This is a compile-time assertion to ensure that this generated file
    55  // is compatible with the grpc package it is being compiled against.
    56  const _ = grpc.SupportPackageIsVersion3
    57  
    58  // Client API for Operator service
    59  
    60  type OperatorClient interface {
    61  	PerformOp(ctx context.Context, in *Int, opts ...grpc.CallOption) (*Int, error)
    62  }
    63  
    64  type operatorClient struct {
    65  	cc *grpc.ClientConn
    66  }
    67  
    68  func NewOperatorClient(cc *grpc.ClientConn) OperatorClient {
    69  	return &operatorClient{cc}
    70  }
    71  
    72  func (c *operatorClient) PerformOp(ctx context.Context, in *Int, opts ...grpc.CallOption) (*Int, error) {
    73  	out := new(Int)
    74  	err := xtgrpc.Invoke(ctx, "/main.Operator/PerformOp", in, out, c.cc, opts...)
    75  	if err != nil {
    76  		return nil, err
    77  	}
    78  	return out, nil
    79  }
    80  
    81  // Server API for Operator service
    82  
    83  type OperatorServer interface {
    84  	PerformOp(context.Context, *Int) (*Int, error)
    85  }
    86  
    87  func RegisterOperatorServer(s *grpc.Server, srv OperatorServer) {
    88  	s.RegisterService(&_Operator_serviceDesc, srv)
    89  }
    90  
    91  func _Operator_PerformOp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    92  	in := new(Int)
    93  	if err := dec(in); err != nil {
    94  		return nil, err
    95  	}
    96  	if interceptor == nil {
    97  		return srv.(OperatorServer).PerformOp(ctx, in)
    98  	}
    99  	info := &grpc.UnaryServerInfo{
   100  		Server:     srv,
   101  		FullMethod: "/main.Operator/PerformOp",
   102  	}
   103  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   104  		return srv.(OperatorServer).PerformOp(ctx, req.(*Int))
   105  	}
   106  	return interceptor(ctx, in, info, handler)
   107  }
   108  
   109  var _Operator_serviceDesc = grpc.ServiceDesc{
   110  	ServiceName: "main.Operator",
   111  	HandlerType: (*OperatorServer)(nil),
   112  	Methods: []grpc.MethodDesc{
   113  		{
   114  			MethodName: "PerformOp",
   115  			Handler:    _Operator_PerformOp_Handler,
   116  		},
   117  	},
   118  	Streams:  []grpc.StreamDesc{},
   119  	Metadata: fileDescriptor0,
   120  }
   121  
   122  func init() { proto.RegisterFile("op.proto", fileDescriptor0) }
   123  
   124  var fileDescriptor0 = []byte{
   125  	// 107 bytes of a gzipped FileDescriptorProto
   126  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0xc8, 0x2f, 0xd0, 0x2b,
   127  	0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d, 0xcc, 0xcc, 0x53, 0x12, 0xe7, 0x62, 0xf6, 0xcc,
   128  	0x2b, 0x11, 0x12, 0xe0, 0x62, 0xce, 0x2b, 0xcd, 0x95, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0e, 0x02,
   129  	0x31, 0x8d, 0xf4, 0xb9, 0x38, 0xfc, 0x0b, 0x52, 0x8b, 0x12, 0x4b, 0xf2, 0x8b, 0x84, 0x94, 0xb9,
   130  	0x38, 0x03, 0x52, 0x8b, 0xd2, 0xf2, 0x8b, 0x72, 0xfd, 0x0b, 0x84, 0x38, 0xf5, 0x40, 0x1a, 0xf5,
   131  	0x3c, 0xf3, 0x4a, 0xa4, 0x10, 0x4c, 0x25, 0x86, 0x24, 0x36, 0xb0, 0xb1, 0xc6, 0x80, 0x00, 0x00,
   132  	0x00, 0xff, 0xff, 0x95, 0xd5, 0xbb, 0xcd, 0x62, 0x00, 0x00, 0x00,
   133  }