go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/grpc/grpcmon/echo.pb.go (about) 1 // Copyright 2021 The LUCI Authors. All rights reserved. 2 // Use of this source code is governed under the Apache License, Version 2.0 3 // that can be found in the LICENSE file. 4 5 // Code generated by protoc-gen-go. DO NOT EDIT. 6 // versions: 7 // protoc-gen-go v1.31.0 8 // protoc v3.21.7 9 // source: go.chromium.org/luci/grpc/grpcmon/echo.proto 10 11 package grpcmon 12 13 import prpc "go.chromium.org/luci/grpc/prpc" 14 15 import ( 16 context "context" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status "google.golang.org/grpc/status" 20 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 21 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 22 reflect "reflect" 23 sync "sync" 24 ) 25 26 const ( 27 // Verify that this generated code is sufficiently up-to-date. 28 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 29 // Verify that runtime/protoimpl is sufficiently up-to-date. 30 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 31 ) 32 33 type SayRequest struct { 34 state protoimpl.MessageState 35 sizeCache protoimpl.SizeCache 36 unknownFields protoimpl.UnknownFields 37 38 Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` 39 } 40 41 func (x *SayRequest) Reset() { 42 *x = SayRequest{} 43 if protoimpl.UnsafeEnabled { 44 mi := &file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes[0] 45 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 46 ms.StoreMessageInfo(mi) 47 } 48 } 49 50 func (x *SayRequest) String() string { 51 return protoimpl.X.MessageStringOf(x) 52 } 53 54 func (*SayRequest) ProtoMessage() {} 55 56 func (x *SayRequest) ProtoReflect() protoreflect.Message { 57 mi := &file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes[0] 58 if protoimpl.UnsafeEnabled && x != nil { 59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 60 if ms.LoadMessageInfo() == nil { 61 ms.StoreMessageInfo(mi) 62 } 63 return ms 64 } 65 return mi.MessageOf(x) 66 } 67 68 // Deprecated: Use SayRequest.ProtoReflect.Descriptor instead. 69 func (*SayRequest) Descriptor() ([]byte, []int) { 70 return file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescGZIP(), []int{0} 71 } 72 73 func (x *SayRequest) GetMsg() string { 74 if x != nil { 75 return x.Msg 76 } 77 return "" 78 } 79 80 type SayResponse struct { 81 state protoimpl.MessageState 82 sizeCache protoimpl.SizeCache 83 unknownFields protoimpl.UnknownFields 84 85 Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` 86 } 87 88 func (x *SayResponse) Reset() { 89 *x = SayResponse{} 90 if protoimpl.UnsafeEnabled { 91 mi := &file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes[1] 92 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 93 ms.StoreMessageInfo(mi) 94 } 95 } 96 97 func (x *SayResponse) String() string { 98 return protoimpl.X.MessageStringOf(x) 99 } 100 101 func (*SayResponse) ProtoMessage() {} 102 103 func (x *SayResponse) ProtoReflect() protoreflect.Message { 104 mi := &file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes[1] 105 if protoimpl.UnsafeEnabled && x != nil { 106 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 107 if ms.LoadMessageInfo() == nil { 108 ms.StoreMessageInfo(mi) 109 } 110 return ms 111 } 112 return mi.MessageOf(x) 113 } 114 115 // Deprecated: Use SayResponse.ProtoReflect.Descriptor instead. 116 func (*SayResponse) Descriptor() ([]byte, []int) { 117 return file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescGZIP(), []int{1} 118 } 119 120 func (x *SayResponse) GetMsg() string { 121 if x != nil { 122 return x.Msg 123 } 124 return "" 125 } 126 127 var File_go_chromium_org_luci_grpc_grpcmon_echo_proto protoreflect.FileDescriptor 128 129 var file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDesc = []byte{ 130 0x0a, 0x2c, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 131 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x72, 0x70, 0x63, 132 0x6d, 0x6f, 0x6e, 0x2f, 0x65, 0x63, 0x68, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 133 0x67, 0x72, 0x70, 0x63, 0x6d, 0x6f, 0x6e, 0x22, 0x1e, 0x0a, 0x0a, 0x53, 0x61, 0x79, 0x52, 0x65, 134 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 135 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x1f, 0x0a, 0x0b, 0x53, 0x61, 0x79, 0x52, 0x65, 136 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 137 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0x3a, 0x0a, 0x04, 0x45, 0x63, 0x68, 0x6f, 138 0x12, 0x32, 0x0a, 0x03, 0x53, 0x61, 0x79, 0x12, 0x13, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x6d, 0x6f, 139 0x6e, 0x2e, 0x53, 0x61, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x67, 140 0x72, 0x70, 0x63, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 141 0x73, 0x65, 0x22, 0x00, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 142 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x67, 0x72, 0x70, 143 0x63, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 144 0x33, 145 } 146 147 var ( 148 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescOnce sync.Once 149 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescData = file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDesc 150 ) 151 152 func file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescGZIP() []byte { 153 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescOnce.Do(func() { 154 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescData) 155 }) 156 return file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDescData 157 } 158 159 var file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes = make([]protoimpl.MessageInfo, 2) 160 var file_go_chromium_org_luci_grpc_grpcmon_echo_proto_goTypes = []interface{}{ 161 (*SayRequest)(nil), // 0: grpcmon.SayRequest 162 (*SayResponse)(nil), // 1: grpcmon.SayResponse 163 } 164 var file_go_chromium_org_luci_grpc_grpcmon_echo_proto_depIdxs = []int32{ 165 0, // 0: grpcmon.Echo.Say:input_type -> grpcmon.SayRequest 166 1, // 1: grpcmon.Echo.Say:output_type -> grpcmon.SayResponse 167 1, // [1:2] is the sub-list for method output_type 168 0, // [0:1] is the sub-list for method input_type 169 0, // [0:0] is the sub-list for extension type_name 170 0, // [0:0] is the sub-list for extension extendee 171 0, // [0:0] is the sub-list for field type_name 172 } 173 174 func init() { file_go_chromium_org_luci_grpc_grpcmon_echo_proto_init() } 175 func file_go_chromium_org_luci_grpc_grpcmon_echo_proto_init() { 176 if File_go_chromium_org_luci_grpc_grpcmon_echo_proto != nil { 177 return 178 } 179 if !protoimpl.UnsafeEnabled { 180 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 181 switch v := v.(*SayRequest); i { 182 case 0: 183 return &v.state 184 case 1: 185 return &v.sizeCache 186 case 2: 187 return &v.unknownFields 188 default: 189 return nil 190 } 191 } 192 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 193 switch v := v.(*SayResponse); i { 194 case 0: 195 return &v.state 196 case 1: 197 return &v.sizeCache 198 case 2: 199 return &v.unknownFields 200 default: 201 return nil 202 } 203 } 204 } 205 type x struct{} 206 out := protoimpl.TypeBuilder{ 207 File: protoimpl.DescBuilder{ 208 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 209 RawDescriptor: file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDesc, 210 NumEnums: 0, 211 NumMessages: 2, 212 NumExtensions: 0, 213 NumServices: 1, 214 }, 215 GoTypes: file_go_chromium_org_luci_grpc_grpcmon_echo_proto_goTypes, 216 DependencyIndexes: file_go_chromium_org_luci_grpc_grpcmon_echo_proto_depIdxs, 217 MessageInfos: file_go_chromium_org_luci_grpc_grpcmon_echo_proto_msgTypes, 218 }.Build() 219 File_go_chromium_org_luci_grpc_grpcmon_echo_proto = out.File 220 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_rawDesc = nil 221 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_goTypes = nil 222 file_go_chromium_org_luci_grpc_grpcmon_echo_proto_depIdxs = nil 223 } 224 225 // Reference imports to suppress errors if they are not otherwise used. 226 var _ context.Context 227 var _ grpc.ClientConnInterface 228 229 // This is a compile-time assertion to ensure that this generated file 230 // is compatible with the grpc package it is being compiled against. 231 const _ = grpc.SupportPackageIsVersion6 232 233 // EchoClient is the client API for Echo service. 234 // 235 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 236 type EchoClient interface { 237 Say(ctx context.Context, in *SayRequest, opts ...grpc.CallOption) (*SayResponse, error) 238 } 239 type echoPRPCClient struct { 240 client *prpc.Client 241 } 242 243 func NewEchoPRPCClient(client *prpc.Client) EchoClient { 244 return &echoPRPCClient{client} 245 } 246 247 func (c *echoPRPCClient) Say(ctx context.Context, in *SayRequest, opts ...grpc.CallOption) (*SayResponse, error) { 248 out := new(SayResponse) 249 err := c.client.Call(ctx, "grpcmon.Echo", "Say", in, out, opts...) 250 if err != nil { 251 return nil, err 252 } 253 return out, nil 254 } 255 256 type echoClient struct { 257 cc grpc.ClientConnInterface 258 } 259 260 func NewEchoClient(cc grpc.ClientConnInterface) EchoClient { 261 return &echoClient{cc} 262 } 263 264 func (c *echoClient) Say(ctx context.Context, in *SayRequest, opts ...grpc.CallOption) (*SayResponse, error) { 265 out := new(SayResponse) 266 err := c.cc.Invoke(ctx, "/grpcmon.Echo/Say", in, out, opts...) 267 if err != nil { 268 return nil, err 269 } 270 return out, nil 271 } 272 273 // EchoServer is the server API for Echo service. 274 type EchoServer interface { 275 Say(context.Context, *SayRequest) (*SayResponse, error) 276 } 277 278 // UnimplementedEchoServer can be embedded to have forward compatible implementations. 279 type UnimplementedEchoServer struct { 280 } 281 282 func (*UnimplementedEchoServer) Say(context.Context, *SayRequest) (*SayResponse, error) { 283 return nil, status.Errorf(codes.Unimplemented, "method Say not implemented") 284 } 285 286 func RegisterEchoServer(s prpc.Registrar, srv EchoServer) { 287 s.RegisterService(&_Echo_serviceDesc, srv) 288 } 289 290 func _Echo_Say_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 291 in := new(SayRequest) 292 if err := dec(in); err != nil { 293 return nil, err 294 } 295 if interceptor == nil { 296 return srv.(EchoServer).Say(ctx, in) 297 } 298 info := &grpc.UnaryServerInfo{ 299 Server: srv, 300 FullMethod: "/grpcmon.Echo/Say", 301 } 302 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 303 return srv.(EchoServer).Say(ctx, req.(*SayRequest)) 304 } 305 return interceptor(ctx, in, info, handler) 306 } 307 308 var _Echo_serviceDesc = grpc.ServiceDesc{ 309 ServiceName: "grpcmon.Echo", 310 HandlerType: (*EchoServer)(nil), 311 Methods: []grpc.MethodDesc{ 312 { 313 MethodName: "Say", 314 Handler: _Echo_Say_Handler, 315 }, 316 }, 317 Streams: []grpc.StreamDesc{}, 318 Metadata: "go.chromium.org/luci/grpc/grpcmon/echo.proto", 319 }