2020-10-25 22:05:37 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2020-10-29 16:38:46 +00:00
package core
2020-10-25 22:05:37 +00:00
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
2021-01-15 09:38:09 +00:00
emptypb "google.golang.org/protobuf/types/known/emptypb"
2020-10-25 22:05:37 +00:00
)
// 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 . SupportPackageIsVersion7
// ControlClient is the client API for Control 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 ControlClient interface {
2021-01-15 09:38:09 +00:00
ForwardInboundMessage ( ctx context . Context , in * InboundMessage , opts ... grpc . CallOption ) ( * emptypb . Empty , error )
GetStatus ( ctx context . Context , in * emptypb . Empty , opts ... grpc . CallOption ) ( * StatusData , error )
2020-10-25 22:05:37 +00:00
}
type controlClient struct {
cc grpc . ClientConnInterface
}
func NewControlClient ( cc grpc . ClientConnInterface ) ControlClient {
return & controlClient { cc }
}
2021-01-15 09:38:09 +00:00
func ( c * controlClient ) ForwardInboundMessage ( ctx context . Context , in * InboundMessage , opts ... grpc . CallOption ) ( * emptypb . Empty , error ) {
out := new ( emptypb . Empty )
2020-10-29 16:38:46 +00:00
err := c . cc . Invoke ( ctx , "/control.Control/ForwardInboundMessage" , in , out , opts ... )
2020-10-25 22:05:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2021-01-15 09:38:09 +00:00
func ( c * controlClient ) GetStatus ( ctx context . Context , in * emptypb . Empty , opts ... grpc . CallOption ) ( * StatusData , error ) {
2020-10-25 22:05:37 +00:00
out := new ( StatusData )
2020-10-29 16:38:46 +00:00
err := c . cc . Invoke ( ctx , "/control.Control/GetStatus" , in , out , opts ... )
2020-10-25 22:05:37 +00:00
if err != nil {
return nil , err
}
return out , nil
}
// ControlServer is the server API for Control service.
// All implementations must embed UnimplementedControlServer
// for forward compatibility
type ControlServer interface {
2021-01-15 09:38:09 +00:00
ForwardInboundMessage ( context . Context , * InboundMessage ) ( * emptypb . Empty , error )
GetStatus ( context . Context , * emptypb . Empty ) ( * StatusData , error )
2020-10-25 22:05:37 +00:00
mustEmbedUnimplementedControlServer ( )
}
// UnimplementedControlServer must be embedded to have forward compatible implementations.
type UnimplementedControlServer struct {
}
2021-01-15 09:38:09 +00:00
func ( UnimplementedControlServer ) ForwardInboundMessage ( context . Context , * InboundMessage ) ( * emptypb . Empty , error ) {
2020-10-25 22:05:37 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method ForwardInboundMessage not implemented" )
}
2021-01-15 09:38:09 +00:00
func ( UnimplementedControlServer ) GetStatus ( context . Context , * emptypb . Empty ) ( * StatusData , error ) {
2020-10-25 22:05:37 +00:00
return nil , status . Errorf ( codes . Unimplemented , "method GetStatus not implemented" )
}
func ( UnimplementedControlServer ) mustEmbedUnimplementedControlServer ( ) { }
// UnsafeControlServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ControlServer will
// result in compilation errors.
type UnsafeControlServer interface {
mustEmbedUnimplementedControlServer ( )
}
func RegisterControlServer ( s grpc . ServiceRegistrar , srv ControlServer ) {
s . RegisterService ( & _Control_serviceDesc , srv )
}
func _Control_ForwardInboundMessage_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( InboundMessage )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ControlServer ) . ForwardInboundMessage ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2020-10-29 16:38:46 +00:00
FullMethod : "/control.Control/ForwardInboundMessage" ,
2020-10-25 22:05:37 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( ControlServer ) . ForwardInboundMessage ( ctx , req . ( * InboundMessage ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Control_GetStatus_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2021-01-15 09:38:09 +00:00
in := new ( emptypb . Empty )
2020-10-25 22:05:37 +00:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( ControlServer ) . GetStatus ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2020-10-29 16:38:46 +00:00
FullMethod : "/control.Control/GetStatus" ,
2020-10-25 22:05:37 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2021-01-15 09:38:09 +00:00
return srv . ( ControlServer ) . GetStatus ( ctx , req . ( * emptypb . Empty ) )
2020-10-25 22:05:37 +00:00
}
return interceptor ( ctx , in , info , handler )
}
var _Control_serviceDesc = grpc . ServiceDesc {
2020-10-29 16:38:46 +00:00
ServiceName : "control.Control" ,
2020-10-25 22:05:37 +00:00
HandlerType : ( * ControlServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "ForwardInboundMessage" ,
Handler : _Control_ForwardInboundMessage_Handler ,
} ,
{
MethodName : "GetStatus" ,
Handler : _Control_GetStatus_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
2020-10-29 16:38:46 +00:00
Metadata : "control.proto" ,
2020-10-25 22:05:37 +00:00
}