mirrored from https://chromium.googlesource.com/infra/luci/luci-go
-
Notifications
You must be signed in to change notification settings - Fork 43
/
helloworld.pb.go
143 lines (122 loc) · 5.09 KB
/
helloworld.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: go.chromium.org/luci/examples/k8s/helloworld/apipb/helloworld.proto
package apipb
import prpc "go.chromium.org/luci/grpc/prpc"
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
func init() {
proto.RegisterFile("go.chromium.org/luci/examples/k8s/helloworld/apipb/helloworld.proto", fileDescriptor_9b18952dfbbf65f9)
}
var fileDescriptor_9b18952dfbbf65f9 = []byte{
// 164 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x4e, 0xcf, 0xd7, 0x4b,
0xce, 0x28, 0xca, 0xcf, 0xcd, 0x2c, 0xcd, 0xd5, 0xcb, 0x2f, 0x4a, 0xd7, 0xcf, 0x29, 0x4d, 0xce,
0xd4, 0x4f, 0xad, 0x48, 0xcc, 0x2d, 0xc8, 0x49, 0x2d, 0xd6, 0xcf, 0xb6, 0x28, 0xd6, 0xcf, 0x48,
0xcd, 0xc9, 0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x4f, 0x2c, 0xc8, 0x2c, 0x48, 0x42, 0x12,
0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x00, 0x69, 0xd2, 0x83, 0x69, 0xd2, 0x43, 0xc8,
0x4b, 0x49, 0xa7, 0xe7, 0xe7, 0xa7, 0xe7, 0xa4, 0xea, 0x83, 0xd5, 0x25, 0x95, 0xa6, 0xe9, 0xa7,
0xe6, 0x16, 0x94, 0x54, 0x42, 0xb4, 0x19, 0xb9, 0x70, 0xb1, 0xbb, 0x17, 0xa5, 0xa6, 0x96, 0xa4,
0x16, 0x09, 0x59, 0x72, 0xb1, 0x06, 0x27, 0x56, 0x7a, 0x64, 0x0a, 0x89, 0xe9, 0x41, 0x74, 0xe8,
0xc1, 0x74, 0xe8, 0xb9, 0x82, 0x74, 0x48, 0xe1, 0x10, 0x57, 0x62, 0x70, 0x62, 0x8f, 0x62, 0x05,
0x3b, 0x2b, 0x89, 0x0d, 0x2c, 0x65, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xdf, 0x69, 0xd4, 0x75,
0xd3, 0x00, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// GreeterClient is the client API for Greeter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type GreeterClient interface {
SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
}
type greeterPRPCClient struct {
client *prpc.Client
}
func NewGreeterPRPCClient(client *prpc.Client) GreeterClient {
return &greeterPRPCClient{client}
}
func (c *greeterPRPCClient) SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.client.Call(ctx, "luci.examples.helloworld.Greeter", "SayHi", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
type greeterClient struct {
cc grpc.ClientConnInterface
}
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient {
return &greeterClient{cc}
}
func (c *greeterClient) SayHi(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/luci.examples.helloworld.Greeter/SayHi", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GreeterServer is the server API for Greeter service.
type GreeterServer interface {
SayHi(context.Context, *empty.Empty) (*empty.Empty, error)
}
// UnimplementedGreeterServer can be embedded to have forward compatible implementations.
type UnimplementedGreeterServer struct {
}
func (*UnimplementedGreeterServer) SayHi(ctx context.Context, req *empty.Empty) (*empty.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method SayHi not implemented")
}
func RegisterGreeterServer(s prpc.Registrar, srv GreeterServer) {
s.RegisterService(&_Greeter_serviceDesc, srv)
}
func _Greeter_SayHi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(empty.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GreeterServer).SayHi(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/luci.examples.helloworld.Greeter/SayHi",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GreeterServer).SayHi(ctx, req.(*empty.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Greeter_serviceDesc = grpc.ServiceDesc{
ServiceName: "luci.examples.helloworld.Greeter",
HandlerType: (*GreeterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SayHi",
Handler: _Greeter_SayHi_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "go.chromium.org/luci/examples/k8s/helloworld/apipb/helloworld.proto",
}