214 lines
7.5 KiB
Go
214 lines
7.5 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.12.4
|
|
// 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
|
|
|
|
// 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)
|
|
Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error)
|
|
}
|
|
|
|
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", 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", 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", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *plugConnectorClient) Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error) {
|
|
out := new(PongResponse)
|
|
err := c.cc.Invoke(ctx, "/PlugConnector/Ping", in, out, opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// 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)
|
|
Ping(context.Context, *PingRequest) (*PongResponse, error)
|
|
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")
|
|
}
|
|
func (UnimplementedPlugConnectorServer) Ping(context.Context, *PingRequest) (*PongResponse, error) {
|
|
return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
|
|
}
|
|
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",
|
|
}
|
|
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",
|
|
}
|
|
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",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PlugConnectorServer).TaskCancel(ctx, req.(*PlugTask))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
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",
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(PlugConnectorServer).Ping(ctx, req.(*PingRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// 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,
|
|
},
|
|
{
|
|
MethodName: "Ping",
|
|
Handler: _PlugConnector_Ping_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "plug.proto",
|
|
}
|