P0.2: Proto definitions and code generation
Full gRPC service definition with 12 RPCs: Deploy, StopService, StartService, RestartService, SyncDesiredState, ListServices, GetServiceStatus, LiveCheck, AdoptContainers, PushFile, PullFile, NodeStatus. buf lint passes. Generated Go code compiles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2128
gen/mcp/v1/mcp.pb.go
Normal file
2128
gen/mcp/v1/mcp.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
551
gen/mcp/v1/mcp_grpc.pb.go
Normal file
551
gen/mcp/v1/mcp_grpc.pb.go
Normal file
@@ -0,0 +1,551 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.6.1
|
||||
// - protoc v6.32.1
|
||||
// source: proto/mcp/v1/mcp.proto
|
||||
|
||||
package mcpv1
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
McpAgentService_Deploy_FullMethodName = "/mcp.v1.McpAgentService/Deploy"
|
||||
McpAgentService_StopService_FullMethodName = "/mcp.v1.McpAgentService/StopService"
|
||||
McpAgentService_StartService_FullMethodName = "/mcp.v1.McpAgentService/StartService"
|
||||
McpAgentService_RestartService_FullMethodName = "/mcp.v1.McpAgentService/RestartService"
|
||||
McpAgentService_SyncDesiredState_FullMethodName = "/mcp.v1.McpAgentService/SyncDesiredState"
|
||||
McpAgentService_ListServices_FullMethodName = "/mcp.v1.McpAgentService/ListServices"
|
||||
McpAgentService_GetServiceStatus_FullMethodName = "/mcp.v1.McpAgentService/GetServiceStatus"
|
||||
McpAgentService_LiveCheck_FullMethodName = "/mcp.v1.McpAgentService/LiveCheck"
|
||||
McpAgentService_AdoptContainers_FullMethodName = "/mcp.v1.McpAgentService/AdoptContainers"
|
||||
McpAgentService_PushFile_FullMethodName = "/mcp.v1.McpAgentService/PushFile"
|
||||
McpAgentService_PullFile_FullMethodName = "/mcp.v1.McpAgentService/PullFile"
|
||||
McpAgentService_NodeStatus_FullMethodName = "/mcp.v1.McpAgentService/NodeStatus"
|
||||
)
|
||||
|
||||
// McpAgentServiceClient is the client API for McpAgentService 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 McpAgentServiceClient interface {
|
||||
// Service lifecycle
|
||||
Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*DeployResponse, error)
|
||||
StopService(ctx context.Context, in *StopServiceRequest, opts ...grpc.CallOption) (*StopServiceResponse, error)
|
||||
StartService(ctx context.Context, in *StartServiceRequest, opts ...grpc.CallOption) (*StartServiceResponse, error)
|
||||
RestartService(ctx context.Context, in *RestartServiceRequest, opts ...grpc.CallOption) (*RestartServiceResponse, error)
|
||||
// Desired state
|
||||
SyncDesiredState(ctx context.Context, in *SyncDesiredStateRequest, opts ...grpc.CallOption) (*SyncDesiredStateResponse, error)
|
||||
// Status and registry
|
||||
ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error)
|
||||
GetServiceStatus(ctx context.Context, in *GetServiceStatusRequest, opts ...grpc.CallOption) (*GetServiceStatusResponse, error)
|
||||
LiveCheck(ctx context.Context, in *LiveCheckRequest, opts ...grpc.CallOption) (*LiveCheckResponse, error)
|
||||
// Adopt
|
||||
AdoptContainers(ctx context.Context, in *AdoptContainersRequest, opts ...grpc.CallOption) (*AdoptContainersResponse, error)
|
||||
// File transfer
|
||||
PushFile(ctx context.Context, in *PushFileRequest, opts ...grpc.CallOption) (*PushFileResponse, error)
|
||||
PullFile(ctx context.Context, in *PullFileRequest, opts ...grpc.CallOption) (*PullFileResponse, error)
|
||||
// Node
|
||||
NodeStatus(ctx context.Context, in *NodeStatusRequest, opts ...grpc.CallOption) (*NodeStatusResponse, error)
|
||||
}
|
||||
|
||||
type mcpAgentServiceClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMcpAgentServiceClient(cc grpc.ClientConnInterface) McpAgentServiceClient {
|
||||
return &mcpAgentServiceClient{cc}
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*DeployResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(DeployResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_Deploy_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) StopService(ctx context.Context, in *StopServiceRequest, opts ...grpc.CallOption) (*StopServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StopServiceResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_StopService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) StartService(ctx context.Context, in *StartServiceRequest, opts ...grpc.CallOption) (*StartServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(StartServiceResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_StartService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) RestartService(ctx context.Context, in *RestartServiceRequest, opts ...grpc.CallOption) (*RestartServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(RestartServiceResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_RestartService_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) SyncDesiredState(ctx context.Context, in *SyncDesiredStateRequest, opts ...grpc.CallOption) (*SyncDesiredStateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(SyncDesiredStateResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_SyncDesiredState_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) ListServices(ctx context.Context, in *ListServicesRequest, opts ...grpc.CallOption) (*ListServicesResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(ListServicesResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_ListServices_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) GetServiceStatus(ctx context.Context, in *GetServiceStatusRequest, opts ...grpc.CallOption) (*GetServiceStatusResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(GetServiceStatusResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_GetServiceStatus_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) LiveCheck(ctx context.Context, in *LiveCheckRequest, opts ...grpc.CallOption) (*LiveCheckResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(LiveCheckResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_LiveCheck_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) AdoptContainers(ctx context.Context, in *AdoptContainersRequest, opts ...grpc.CallOption) (*AdoptContainersResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(AdoptContainersResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_AdoptContainers_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) PushFile(ctx context.Context, in *PushFileRequest, opts ...grpc.CallOption) (*PushFileResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PushFileResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_PushFile_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) PullFile(ctx context.Context, in *PullFileRequest, opts ...grpc.CallOption) (*PullFileResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(PullFileResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_PullFile_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mcpAgentServiceClient) NodeStatus(ctx context.Context, in *NodeStatusRequest, opts ...grpc.CallOption) (*NodeStatusResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(NodeStatusResponse)
|
||||
err := c.cc.Invoke(ctx, McpAgentService_NodeStatus_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// McpAgentServiceServer is the server API for McpAgentService service.
|
||||
// All implementations must embed UnimplementedMcpAgentServiceServer
|
||||
// for forward compatibility.
|
||||
type McpAgentServiceServer interface {
|
||||
// Service lifecycle
|
||||
Deploy(context.Context, *DeployRequest) (*DeployResponse, error)
|
||||
StopService(context.Context, *StopServiceRequest) (*StopServiceResponse, error)
|
||||
StartService(context.Context, *StartServiceRequest) (*StartServiceResponse, error)
|
||||
RestartService(context.Context, *RestartServiceRequest) (*RestartServiceResponse, error)
|
||||
// Desired state
|
||||
SyncDesiredState(context.Context, *SyncDesiredStateRequest) (*SyncDesiredStateResponse, error)
|
||||
// Status and registry
|
||||
ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error)
|
||||
GetServiceStatus(context.Context, *GetServiceStatusRequest) (*GetServiceStatusResponse, error)
|
||||
LiveCheck(context.Context, *LiveCheckRequest) (*LiveCheckResponse, error)
|
||||
// Adopt
|
||||
AdoptContainers(context.Context, *AdoptContainersRequest) (*AdoptContainersResponse, error)
|
||||
// File transfer
|
||||
PushFile(context.Context, *PushFileRequest) (*PushFileResponse, error)
|
||||
PullFile(context.Context, *PullFileRequest) (*PullFileResponse, error)
|
||||
// Node
|
||||
NodeStatus(context.Context, *NodeStatusRequest) (*NodeStatusResponse, error)
|
||||
mustEmbedUnimplementedMcpAgentServiceServer()
|
||||
}
|
||||
|
||||
// UnimplementedMcpAgentServiceServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMcpAgentServiceServer struct{}
|
||||
|
||||
func (UnimplementedMcpAgentServiceServer) Deploy(context.Context, *DeployRequest) (*DeployResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method Deploy not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) StopService(context.Context, *StopServiceRequest) (*StopServiceResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method StopService not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) StartService(context.Context, *StartServiceRequest) (*StartServiceResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method StartService not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) RestartService(context.Context, *RestartServiceRequest) (*RestartServiceResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method RestartService not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) SyncDesiredState(context.Context, *SyncDesiredStateRequest) (*SyncDesiredStateResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method SyncDesiredState not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) ListServices(context.Context, *ListServicesRequest) (*ListServicesResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method ListServices not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) GetServiceStatus(context.Context, *GetServiceStatusRequest) (*GetServiceStatusResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method GetServiceStatus not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) LiveCheck(context.Context, *LiveCheckRequest) (*LiveCheckResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method LiveCheck not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) AdoptContainers(context.Context, *AdoptContainersRequest) (*AdoptContainersResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method AdoptContainers not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) PushFile(context.Context, *PushFileRequest) (*PushFileResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method PushFile not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) PullFile(context.Context, *PullFileRequest) (*PullFileResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method PullFile not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) NodeStatus(context.Context, *NodeStatusRequest) (*NodeStatusResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "method NodeStatus not implemented")
|
||||
}
|
||||
func (UnimplementedMcpAgentServiceServer) mustEmbedUnimplementedMcpAgentServiceServer() {}
|
||||
func (UnimplementedMcpAgentServiceServer) testEmbeddedByValue() {}
|
||||
|
||||
// UnsafeMcpAgentServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to McpAgentServiceServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMcpAgentServiceServer interface {
|
||||
mustEmbedUnimplementedMcpAgentServiceServer()
|
||||
}
|
||||
|
||||
func RegisterMcpAgentServiceServer(s grpc.ServiceRegistrar, srv McpAgentServiceServer) {
|
||||
// If the following call panics, it indicates UnimplementedMcpAgentServiceServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
s.RegisterService(&McpAgentService_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _McpAgentService_Deploy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(DeployRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).Deploy(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_Deploy_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).Deploy(ctx, req.(*DeployRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_StopService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StopServiceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).StopService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_StopService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).StopService(ctx, req.(*StopServiceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_StartService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(StartServiceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).StartService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_StartService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).StartService(ctx, req.(*StartServiceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_RestartService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(RestartServiceRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).RestartService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_RestartService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).RestartService(ctx, req.(*RestartServiceRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_SyncDesiredState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SyncDesiredStateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).SyncDesiredState(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_SyncDesiredState_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).SyncDesiredState(ctx, req.(*SyncDesiredStateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_ListServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListServicesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).ListServices(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_ListServices_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).ListServices(ctx, req.(*ListServicesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_GetServiceStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetServiceStatusRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).GetServiceStatus(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_GetServiceStatus_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).GetServiceStatus(ctx, req.(*GetServiceStatusRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_LiveCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LiveCheckRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).LiveCheck(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_LiveCheck_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).LiveCheck(ctx, req.(*LiveCheckRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_AdoptContainers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(AdoptContainersRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).AdoptContainers(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_AdoptContainers_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).AdoptContainers(ctx, req.(*AdoptContainersRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_PushFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PushFileRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).PushFile(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_PushFile_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).PushFile(ctx, req.(*PushFileRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_PullFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(PullFileRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).PullFile(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_PullFile_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).PullFile(ctx, req.(*PullFileRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _McpAgentService_NodeStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(NodeStatusRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(McpAgentServiceServer).NodeStatus(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: McpAgentService_NodeStatus_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(McpAgentServiceServer).NodeStatus(ctx, req.(*NodeStatusRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// McpAgentService_ServiceDesc is the grpc.ServiceDesc for McpAgentService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var McpAgentService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "mcp.v1.McpAgentService",
|
||||
HandlerType: (*McpAgentServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Deploy",
|
||||
Handler: _McpAgentService_Deploy_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "StopService",
|
||||
Handler: _McpAgentService_StopService_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "StartService",
|
||||
Handler: _McpAgentService_StartService_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RestartService",
|
||||
Handler: _McpAgentService_RestartService_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SyncDesiredState",
|
||||
Handler: _McpAgentService_SyncDesiredState_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListServices",
|
||||
Handler: _McpAgentService_ListServices_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetServiceStatus",
|
||||
Handler: _McpAgentService_GetServiceStatus_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "LiveCheck",
|
||||
Handler: _McpAgentService_LiveCheck_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "AdoptContainers",
|
||||
Handler: _McpAgentService_AdoptContainers_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PushFile",
|
||||
Handler: _McpAgentService_PushFile_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "PullFile",
|
||||
Handler: _McpAgentService_PullFile_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "NodeStatus",
|
||||
Handler: _McpAgentService_NodeStatus_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "proto/mcp/v1/mcp.proto",
|
||||
}
|
||||
Reference in New Issue
Block a user