2024-02-20 20:21:41 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v3.19.6
// source: plug.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
const (
PlugConnector_TaskStart_FullMethodName = "/PlugConnector/TaskStart"
PlugConnector_TaskStatus_FullMethodName = "/PlugConnector/TaskStatus"
PlugConnector_TaskCancel_FullMethodName = "/PlugConnector/TaskCancel"
2024-03-05 20:38:46 +00:00
PlugConnector_Ping_FullMethodName = "/PlugConnector/Ping"
2024-02-20 20:21:41 +00:00
)
// PlugConnectorClient is the client API for PlugConnector 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 PlugConnectorClient interface {
TaskStart ( ctx context . Context , in * PlugTaskCreation , opts ... grpc . CallOption ) ( * PlugTaskStatus , error )
TaskStatus ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error )
TaskCancel ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error )
2024-03-05 20:38:46 +00:00
Ping ( ctx context . Context , in * PingRequest , opts ... grpc . CallOption ) ( * PongResponse , error )
2024-02-20 20:21:41 +00:00
}
type plugConnectorClient struct {
cc grpc . ClientConnInterface
}
func NewPlugConnectorClient ( cc grpc . ClientConnInterface ) PlugConnectorClient {
return & plugConnectorClient { cc }
}
func ( c * plugConnectorClient ) TaskStart ( ctx context . Context , in * PlugTaskCreation , opts ... grpc . CallOption ) ( * PlugTaskStatus , error ) {
out := new ( PlugTaskStatus )
err := c . cc . Invoke ( ctx , PlugConnector_TaskStart_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * plugConnectorClient ) TaskStatus ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error ) {
out := new ( PlugTaskStatus )
err := c . cc . Invoke ( ctx , PlugConnector_TaskStatus_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
func ( c * plugConnectorClient ) TaskCancel ( ctx context . Context , in * PlugTask , opts ... grpc . CallOption ) ( * PlugTaskStatus , error ) {
out := new ( PlugTaskStatus )
err := c . cc . Invoke ( ctx , PlugConnector_TaskCancel_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-03-05 20:38:46 +00:00
func ( c * plugConnectorClient ) Ping ( ctx context . Context , in * PingRequest , opts ... grpc . CallOption ) ( * PongResponse , error ) {
out := new ( PongResponse )
err := c . cc . Invoke ( ctx , PlugConnector_Ping_FullMethodName , in , out , opts ... )
if err != nil {
return nil , err
}
return out , nil
}
2024-02-20 20:21:41 +00:00
// PlugConnectorServer is the server API for PlugConnector service.
// All implementations must embed UnimplementedPlugConnectorServer
// for forward compatibility
type PlugConnectorServer interface {
TaskStart ( context . Context , * PlugTaskCreation ) ( * PlugTaskStatus , error )
TaskStatus ( context . Context , * PlugTask ) ( * PlugTaskStatus , error )
TaskCancel ( context . Context , * PlugTask ) ( * PlugTaskStatus , error )
2024-03-05 20:38:46 +00:00
Ping ( context . Context , * PingRequest ) ( * PongResponse , error )
2024-02-20 20:21:41 +00:00
mustEmbedUnimplementedPlugConnectorServer ( )
}
// UnimplementedPlugConnectorServer must be embedded to have forward compatible implementations.
type UnimplementedPlugConnectorServer struct {
}
func ( UnimplementedPlugConnectorServer ) TaskStart ( context . Context , * PlugTaskCreation ) ( * PlugTaskStatus , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TaskStart not implemented" )
}
func ( UnimplementedPlugConnectorServer ) TaskStatus ( context . Context , * PlugTask ) ( * PlugTaskStatus , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TaskStatus not implemented" )
}
func ( UnimplementedPlugConnectorServer ) TaskCancel ( context . Context , * PlugTask ) ( * PlugTaskStatus , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method TaskCancel not implemented" )
}
2024-03-05 20:38:46 +00:00
func ( UnimplementedPlugConnectorServer ) Ping ( context . Context , * PingRequest ) ( * PongResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method Ping not implemented" )
}
2024-02-20 20:21:41 +00:00
func ( UnimplementedPlugConnectorServer ) mustEmbedUnimplementedPlugConnectorServer ( ) { }
// UnsafePlugConnectorServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to PlugConnectorServer will
// result in compilation errors.
type UnsafePlugConnectorServer interface {
mustEmbedUnimplementedPlugConnectorServer ( )
}
func RegisterPlugConnectorServer ( s grpc . ServiceRegistrar , srv PlugConnectorServer ) {
s . RegisterService ( & PlugConnector_ServiceDesc , srv )
}
func _PlugConnector_TaskStart_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PlugTaskCreation )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . TaskStart ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : PlugConnector_TaskStart_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . TaskStart ( ctx , req . ( * PlugTaskCreation ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PlugConnector_TaskStatus_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PlugTask )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . TaskStatus ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : PlugConnector_TaskStatus_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . TaskStatus ( ctx , req . ( * PlugTask ) )
}
return interceptor ( ctx , in , info , handler )
}
func _PlugConnector_TaskCancel_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PlugTask )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . TaskCancel ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : PlugConnector_TaskCancel_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . TaskCancel ( ctx , req . ( * PlugTask ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-03-05 20:38:46 +00:00
func _PlugConnector_Ping_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( PingRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( PlugConnectorServer ) . Ping ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : PlugConnector_Ping_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( PlugConnectorServer ) . Ping ( ctx , req . ( * PingRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-02-20 20:21:41 +00:00
// PlugConnector_ServiceDesc is the grpc.ServiceDesc for PlugConnector service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var PlugConnector_ServiceDesc = grpc . ServiceDesc {
ServiceName : "PlugConnector" ,
HandlerType : ( * PlugConnectorServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "TaskStart" ,
Handler : _PlugConnector_TaskStart_Handler ,
} ,
{
MethodName : "TaskStatus" ,
Handler : _PlugConnector_TaskStatus_Handler ,
} ,
{
MethodName : "TaskCancel" ,
Handler : _PlugConnector_TaskCancel_Handler ,
} ,
2024-03-05 20:38:46 +00:00
{
MethodName : "Ping" ,
Handler : _PlugConnector_Ping_Handler ,
} ,
2024-02-20 20:21:41 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "plug.proto" ,
}