2021-01-19 22:08:06 +03:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package service
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.
2021-03-22 09:06:35 +03:00
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2021-01-19 22:08:06 +03:00
2021-01-29 15:01:10 +03:00
// RegisterClient is the client API for Register service.
2021-01-19 22:08:06 +03:00
//
// 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.
2021-01-29 15:01:10 +03:00
type RegisterClient interface {
LookupService ( ctx context . Context , in * LookupRequest , opts ... grpc . CallOption ) ( * LookupResponse , error )
2021-01-19 22:08:06 +03:00
Register ( ctx context . Context , in * Service , opts ... grpc . CallOption ) ( * EmptyResponse , error )
Deregister ( ctx context . Context , in * Service , opts ... grpc . CallOption ) ( * EmptyResponse , error )
ListServices ( ctx context . Context , in * ListRequest , opts ... grpc . CallOption ) ( * ListResponse , error )
2021-01-29 15:01:10 +03:00
Watch ( ctx context . Context , in * WatchRequest , opts ... grpc . CallOption ) ( Register_WatchClient , error )
2021-01-19 22:08:06 +03:00
}
2021-01-29 15:01:10 +03:00
type registerClient struct {
2021-01-19 22:08:06 +03:00
cc grpc . ClientConnInterface
}
2021-01-29 15:01:10 +03:00
func NewRegisterClient ( cc grpc . ClientConnInterface ) RegisterClient {
return & registerClient { cc }
2021-01-19 22:08:06 +03:00
}
2021-01-29 15:01:10 +03:00
func ( c * registerClient ) LookupService ( ctx context . Context , in * LookupRequest , opts ... grpc . CallOption ) ( * LookupResponse , error ) {
out := new ( LookupResponse )
err := c . cc . Invoke ( ctx , "/service.Register/LookupService" , in , out , opts ... )
2021-01-19 22:08:06 +03:00
if err != nil {
return nil , err
}
return out , nil
}
2021-01-29 15:01:10 +03:00
func ( c * registerClient ) Register ( ctx context . Context , in * Service , opts ... grpc . CallOption ) ( * EmptyResponse , error ) {
2021-01-19 22:08:06 +03:00
out := new ( EmptyResponse )
2021-01-29 15:01:10 +03:00
err := c . cc . Invoke ( ctx , "/service.Register/Register" , in , out , opts ... )
2021-01-19 22:08:06 +03:00
if err != nil {
return nil , err
}
return out , nil
}
2021-01-29 15:01:10 +03:00
func ( c * registerClient ) Deregister ( ctx context . Context , in * Service , opts ... grpc . CallOption ) ( * EmptyResponse , error ) {
2021-01-19 22:08:06 +03:00
out := new ( EmptyResponse )
2021-01-29 15:01:10 +03:00
err := c . cc . Invoke ( ctx , "/service.Register/Deregister" , in , out , opts ... )
2021-01-19 22:08:06 +03:00
if err != nil {
return nil , err
}
return out , nil
}
2021-01-29 15:01:10 +03:00
func ( c * registerClient ) ListServices ( ctx context . Context , in * ListRequest , opts ... grpc . CallOption ) ( * ListResponse , error ) {
2021-01-19 22:08:06 +03:00
out := new ( ListResponse )
2021-01-29 15:01:10 +03:00
err := c . cc . Invoke ( ctx , "/service.Register/ListServices" , in , out , opts ... )
2021-01-19 22:08:06 +03:00
if err != nil {
return nil , err
}
return out , nil
}
2021-01-29 15:01:10 +03:00
func ( c * registerClient ) Watch ( ctx context . Context , in * WatchRequest , opts ... grpc . CallOption ) ( Register_WatchClient , error ) {
2021-03-22 09:06:35 +03:00
stream , err := c . cc . NewStream ( ctx , & Register_ServiceDesc . Streams [ 0 ] , "/service.Register/Watch" , opts ... )
2021-01-19 22:08:06 +03:00
if err != nil {
return nil , err
}
2021-01-29 15:01:10 +03:00
x := & registerWatchClient { stream }
2021-01-19 22:08:06 +03:00
if err := x . ClientStream . SendMsg ( in ) ; err != nil {
return nil , err
}
if err := x . ClientStream . CloseSend ( ) ; err != nil {
return nil , err
}
return x , nil
}
2021-01-29 15:01:10 +03:00
type Register_WatchClient interface {
2021-01-19 22:08:06 +03:00
Recv ( ) ( * Result , error )
grpc . ClientStream
}
2021-01-29 15:01:10 +03:00
type registerWatchClient struct {
2021-01-19 22:08:06 +03:00
grpc . ClientStream
}
2021-01-29 15:01:10 +03:00
func ( x * registerWatchClient ) Recv ( ) ( * Result , error ) {
2021-01-19 22:08:06 +03:00
m := new ( Result )
if err := x . ClientStream . RecvMsg ( m ) ; err != nil {
return nil , err
}
return m , nil
}
2021-01-29 15:01:10 +03:00
// RegisterServer is the server API for Register service.
// All implementations must embed UnimplementedRegisterServer
2021-01-19 22:08:06 +03:00
// for forward compatibility
2021-01-29 15:01:10 +03:00
type RegisterServer interface {
LookupService ( context . Context , * LookupRequest ) ( * LookupResponse , error )
2021-01-19 22:08:06 +03:00
Register ( context . Context , * Service ) ( * EmptyResponse , error )
Deregister ( context . Context , * Service ) ( * EmptyResponse , error )
ListServices ( context . Context , * ListRequest ) ( * ListResponse , error )
2021-01-29 15:01:10 +03:00
Watch ( * WatchRequest , Register_WatchServer ) error
mustEmbedUnimplementedRegisterServer ( )
2021-01-19 22:08:06 +03:00
}
2021-01-29 15:01:10 +03:00
// UnimplementedRegisterServer must be embedded to have forward compatible implementations.
type UnimplementedRegisterServer struct {
2021-01-19 22:08:06 +03:00
}
2021-03-22 09:06:35 +03:00
func ( UnimplementedRegisterServer ) LookupService ( context . Context , * LookupRequest ) ( * LookupResponse , error ) {
2021-01-29 15:01:10 +03:00
return nil , status . Errorf ( codes . Unimplemented , "method LookupService not implemented" )
2021-01-19 22:08:06 +03:00
}
2021-03-22 09:06:35 +03:00
func ( UnimplementedRegisterServer ) Register ( context . Context , * Service ) ( * EmptyResponse , error ) {
2021-01-19 22:08:06 +03:00
return nil , status . Errorf ( codes . Unimplemented , "method Register not implemented" )
}
2021-03-22 09:06:35 +03:00
func ( UnimplementedRegisterServer ) Deregister ( context . Context , * Service ) ( * EmptyResponse , error ) {
2021-01-19 22:08:06 +03:00
return nil , status . Errorf ( codes . Unimplemented , "method Deregister not implemented" )
}
2021-03-22 09:06:35 +03:00
func ( UnimplementedRegisterServer ) ListServices ( context . Context , * ListRequest ) ( * ListResponse , error ) {
2021-01-19 22:08:06 +03:00
return nil , status . Errorf ( codes . Unimplemented , "method ListServices not implemented" )
}
2021-03-22 09:06:35 +03:00
func ( UnimplementedRegisterServer ) Watch ( * WatchRequest , Register_WatchServer ) error {
2021-01-19 22:08:06 +03:00
return status . Errorf ( codes . Unimplemented , "method Watch not implemented" )
}
2021-03-22 09:06:35 +03:00
func ( UnimplementedRegisterServer ) mustEmbedUnimplementedRegisterServer ( ) { }
2021-01-19 22:08:06 +03:00
2021-03-22 09:06:35 +03:00
// UnsafeRegisterServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to RegisterServer will
// result in compilation errors.
type UnsafeRegisterServer interface {
mustEmbedUnimplementedRegisterServer ( )
}
func RegisterRegisterServer ( s grpc . ServiceRegistrar , srv RegisterServer ) {
s . RegisterService ( & Register_ServiceDesc , srv )
2021-01-19 22:08:06 +03:00
}
2021-01-29 15:01:10 +03:00
func _Register_LookupService_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( LookupRequest )
2021-01-19 22:08:06 +03:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . LookupService ( ctx , in )
2021-01-19 22:08:06 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2021-01-29 15:01:10 +03:00
FullMethod : "/service.Register/LookupService" ,
2021-01-19 22:08:06 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . LookupService ( ctx , req . ( * LookupRequest ) )
2021-01-19 22:08:06 +03:00
}
return interceptor ( ctx , in , info , handler )
}
2021-01-29 15:01:10 +03:00
func _Register_Register_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-01-19 22:08:06 +03:00
in := new ( Service )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . Register ( ctx , in )
2021-01-19 22:08:06 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2021-01-29 15:01:10 +03:00
FullMethod : "/service.Register/Register" ,
2021-01-19 22:08:06 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . Register ( ctx , req . ( * Service ) )
2021-01-19 22:08:06 +03:00
}
return interceptor ( ctx , in , info , handler )
}
2021-01-29 15:01:10 +03:00
func _Register_Deregister_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-01-19 22:08:06 +03:00
in := new ( Service )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . Deregister ( ctx , in )
2021-01-19 22:08:06 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2021-01-29 15:01:10 +03:00
FullMethod : "/service.Register/Deregister" ,
2021-01-19 22:08:06 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . Deregister ( ctx , req . ( * Service ) )
2021-01-19 22:08:06 +03:00
}
return interceptor ( ctx , in , info , handler )
}
2021-01-29 15:01:10 +03:00
func _Register_ListServices_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-01-19 22:08:06 +03:00
in := new ( ListRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . ListServices ( ctx , in )
2021-01-19 22:08:06 +03:00
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2021-01-29 15:01:10 +03:00
FullMethod : "/service.Register/ListServices" ,
2021-01-19 22:08:06 +03:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . ListServices ( ctx , req . ( * ListRequest ) )
2021-01-19 22:08:06 +03:00
}
return interceptor ( ctx , in , info , handler )
}
2021-01-29 15:01:10 +03:00
func _Register_Watch_Handler ( srv interface { } , stream grpc . ServerStream ) error {
2021-01-19 22:08:06 +03:00
m := new ( WatchRequest )
if err := stream . RecvMsg ( m ) ; err != nil {
return err
}
2021-01-29 15:01:10 +03:00
return srv . ( RegisterServer ) . Watch ( m , & registerWatchServer { stream } )
2021-01-19 22:08:06 +03:00
}
2021-01-29 15:01:10 +03:00
type Register_WatchServer interface {
2021-01-19 22:08:06 +03:00
Send ( * Result ) error
grpc . ServerStream
}
2021-01-29 15:01:10 +03:00
type registerWatchServer struct {
2021-01-19 22:08:06 +03:00
grpc . ServerStream
}
2021-01-29 15:01:10 +03:00
func ( x * registerWatchServer ) Send ( m * Result ) error {
2021-01-19 22:08:06 +03:00
return x . ServerStream . SendMsg ( m )
}
2021-03-22 09:06:35 +03:00
// Register_ServiceDesc is the grpc.ServiceDesc for Register service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Register_ServiceDesc = grpc . ServiceDesc {
2021-01-29 15:01:10 +03:00
ServiceName : "service.Register" ,
HandlerType : ( * RegisterServer ) ( nil ) ,
2021-01-19 22:08:06 +03:00
Methods : [ ] grpc . MethodDesc {
{
2021-01-29 15:01:10 +03:00
MethodName : "LookupService" ,
Handler : _Register_LookupService_Handler ,
2021-01-19 22:08:06 +03:00
} ,
{
MethodName : "Register" ,
2021-01-29 15:01:10 +03:00
Handler : _Register_Register_Handler ,
2021-01-19 22:08:06 +03:00
} ,
{
MethodName : "Deregister" ,
2021-01-29 15:01:10 +03:00
Handler : _Register_Deregister_Handler ,
2021-01-19 22:08:06 +03:00
} ,
{
MethodName : "ListServices" ,
2021-01-29 15:01:10 +03:00
Handler : _Register_ListServices_Handler ,
2021-01-19 22:08:06 +03:00
} ,
} ,
Streams : [ ] grpc . StreamDesc {
{
StreamName : "Watch" ,
2021-01-29 15:01:10 +03:00
Handler : _Register_Watch_Handler ,
2021-01-19 22:08:06 +03:00
ServerStreams : true ,
} ,
} ,
2021-03-22 09:06:35 +03:00
Metadata : "service.proto" ,
2021-01-19 22:08:06 +03:00
}