// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.6.1
// source: internal/pkg/grpc/server.proto
package grpc
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// 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
// HandshakeClient is the client API for Handshake 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 HandshakeClient interface {
ClientDiscoveryHandler ( ctx context . Context , in * ClientRequest , opts ... grpc . CallOption ) ( * ClientResponse , error )
}
type handshakeClient struct {
cc grpc . ClientConnInterface
}
func NewHandshakeClient ( cc grpc . ClientConnInterface ) HandshakeClient {
return & handshakeClient { cc }
}
func ( c * handshakeClient ) ClientDiscoveryHandler ( ctx context . Context , in * ClientRequest , opts ... grpc . CallOption ) ( * ClientResponse , error ) {
out := new ( ClientResponse )
err := c . cc . Invoke ( ctx , "/grpc.handshake/ClientDiscoveryHandler" , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
// HandshakeServer is the server API for Handshake service.
// All implementations must embed UnimplementedHandshakeServer
// for forward compatibility
type HandshakeServer interface {
ClientDiscoveryHandler ( context . Context , * ClientRequest ) ( * ClientResponse , error )
mustEmbedUnimplementedHandshakeServer ( )
}
// UnimplementedHandshakeServer must be embedded to have forward compatible implementations.
type UnimplementedHandshakeServer struct {
}
func ( UnimplementedHandshakeServer ) ClientDiscoveryHandler ( context . Context , * ClientRequest ) ( * ClientResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method ClientDiscoveryHandler not implemented" )
}
func ( UnimplementedHandshakeServer ) mustEmbedUnimplementedHandshakeServer ( ) { }
// UnsafeHandshakeServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to HandshakeServer will
// result in compilation errors.
type UnsafeHandshakeServer interface {
mustEmbedUnimplementedHandshakeServer ( )
}
func RegisterHandshakeServer ( s grpc . ServiceRegistrar , srv HandshakeServer ) {
s . RegisterService ( & Handshake_ServiceDesc , srv )
}
func _Handshake_ClientDiscoveryHandler_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( ClientRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( HandshakeServer ) . ClientDiscoveryHandler ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : "/grpc.handshake/ClientDiscoveryHandler" ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( HandshakeServer ) . ClientDiscoveryHandler ( ctx , req . ( * ClientRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
// Handshake_ServiceDesc is the grpc.ServiceDesc for Handshake service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Handshake_ServiceDesc = grpc . ServiceDesc {
ServiceName : "grpc.handshake" ,
HandlerType : ( * HandshakeServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "ClientDiscoveryHandler" ,
Handler : _Handshake_ClientDiscoveryHandler_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "internal/pkg/grpc/server.proto" ,
}