tcc/grpc/pb/tcc_grpc_grpc.pb.go (132 lines of code) (raw):
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.21.2
// source: sample/tcc/grpc/pb/tcc_grpc.proto
package pb
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
anypb "google.golang.org/protobuf/types/known/anypb"
wrapperspb "google.golang.org/protobuf/types/known/wrapperspb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// TCCServiceBusiness1Client is the client API for TCCServiceBusiness1 service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TCCServiceBusiness1Client interface {
Remoting(ctx context.Context, in *Params, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error)
}
type tCCServiceBusiness1Client struct {
cc grpc.ClientConnInterface
}
func NewTCCServiceBusiness1Client(cc grpc.ClientConnInterface) TCCServiceBusiness1Client {
return &tCCServiceBusiness1Client{cc}
}
func (c *tCCServiceBusiness1Client) Remoting(ctx context.Context, in *Params, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) {
out := new(wrapperspb.BoolValue)
err := c.cc.Invoke(ctx, "/TCCServiceBusiness1/Remoting", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TCCServiceBusiness1Server is the server API for TCCServiceBusiness1 service.
// All implementations must embed UnimplementedTCCServiceBusiness1Server
// for forward compatibility
type TCCServiceBusiness1Server interface {
Remoting(context.Context, *Params) (*wrapperspb.BoolValue, error)
mustEmbedUnimplementedTCCServiceBusiness1Server()
}
// UnimplementedTCCServiceBusiness1Server must be embedded to have forward compatible implementations.
type UnimplementedTCCServiceBusiness1Server struct{}
func (UnimplementedTCCServiceBusiness1Server) Remoting(context.Context, *Params) (*wrapperspb.BoolValue, error) {
return nil, status.Errorf(codes.Unimplemented, "method Remoting not implemented")
}
func (UnimplementedTCCServiceBusiness1Server) mustEmbedUnimplementedTCCServiceBusiness1Server() {}
// UnsafeTCCServiceBusiness1Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TCCServiceBusiness1Server will
// result in compilation errors.
type UnsafeTCCServiceBusiness1Server interface {
mustEmbedUnimplementedTCCServiceBusiness1Server()
}
func RegisterTCCServiceBusiness1Server(s grpc.ServiceRegistrar, srv TCCServiceBusiness1Server) {
s.RegisterService(&TCCServiceBusiness1_ServiceDesc, srv)
}
func _TCCServiceBusiness1_Remoting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Params)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TCCServiceBusiness1Server).Remoting(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/TCCServiceBusiness1/Remoting",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TCCServiceBusiness1Server).Remoting(ctx, req.(*Params))
}
return interceptor(ctx, in, info, handler)
}
// TCCServiceBusiness1_ServiceDesc is the grpc.ServiceDesc for TCCServiceBusiness1 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TCCServiceBusiness1_ServiceDesc = grpc.ServiceDesc{
ServiceName: "TCCServiceBusiness1",
HandlerType: (*TCCServiceBusiness1Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Remoting",
Handler: _TCCServiceBusiness1_Remoting_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "sample/tcc/grpc/pb/tcc_grpc.proto",
}
// TCCServiceBusiness2Client is the client API for TCCServiceBusiness2 service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TCCServiceBusiness2Client interface {
Remoting(ctx context.Context, in *Params, opts ...grpc.CallOption) (*anypb.Any, error)
}
type tCCServiceBusiness2Client struct {
cc grpc.ClientConnInterface
}
func NewTCCServiceBusiness2Client(cc grpc.ClientConnInterface) TCCServiceBusiness2Client {
return &tCCServiceBusiness2Client{cc}
}
func (c *tCCServiceBusiness2Client) Remoting(ctx context.Context, in *Params, opts ...grpc.CallOption) (*anypb.Any, error) {
out := new(anypb.Any)
err := c.cc.Invoke(ctx, "/TCCServiceBusiness2/Remoting", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TCCServiceBusiness2Server is the server API for TCCServiceBusiness2 service.
// All implementations must embed UnimplementedTCCServiceBusiness2Server
// for forward compatibility
type TCCServiceBusiness2Server interface {
Remoting(context.Context, *Params) (*anypb.Any, error)
mustEmbedUnimplementedTCCServiceBusiness2Server()
}
// UnimplementedTCCServiceBusiness2Server must be embedded to have forward compatible implementations.
type UnimplementedTCCServiceBusiness2Server struct{}
func (UnimplementedTCCServiceBusiness2Server) Remoting(context.Context, *Params) (*anypb.Any, error) {
return nil, status.Errorf(codes.Unimplemented, "method Remoting not implemented")
}
func (UnimplementedTCCServiceBusiness2Server) mustEmbedUnimplementedTCCServiceBusiness2Server() {}
// UnsafeTCCServiceBusiness2Server may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TCCServiceBusiness2Server will
// result in compilation errors.
type UnsafeTCCServiceBusiness2Server interface {
mustEmbedUnimplementedTCCServiceBusiness2Server()
}
func RegisterTCCServiceBusiness2Server(s grpc.ServiceRegistrar, srv TCCServiceBusiness2Server) {
s.RegisterService(&TCCServiceBusiness2_ServiceDesc, srv)
}
func _TCCServiceBusiness2_Remoting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Params)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TCCServiceBusiness2Server).Remoting(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/TCCServiceBusiness2/Remoting",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TCCServiceBusiness2Server).Remoting(ctx, req.(*Params))
}
return interceptor(ctx, in, info, handler)
}
// TCCServiceBusiness2_ServiceDesc is the grpc.ServiceDesc for TCCServiceBusiness2 service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TCCServiceBusiness2_ServiceDesc = grpc.ServiceDesc{
ServiceName: "TCCServiceBusiness2",
HandlerType: (*TCCServiceBusiness2Server)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Remoting",
Handler: _TCCServiceBusiness2_Remoting_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "sample/tcc/grpc/pb/tcc_grpc.proto",
}