- New proto/mcp/v1/master.proto: McpMasterService with Deploy, Undeploy, Status, ListNodes RPCs and all message types per architecture v2 spec. - ServiceSpec gains tier (field 5), node (field 6), snapshot (field 7). - RouteSpec gains public (field 5) for edge routing. - New SnapshotConfig message (method + excludes). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
248 lines
9.8 KiB
Go
248 lines
9.8 KiB
Go
// McpMasterService: Multi-node orchestration for the Metacircular platform.
|
|
|
|
// 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/master.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 (
|
|
McpMasterService_Deploy_FullMethodName = "/mcp.v1.McpMasterService/Deploy"
|
|
McpMasterService_Undeploy_FullMethodName = "/mcp.v1.McpMasterService/Undeploy"
|
|
McpMasterService_Status_FullMethodName = "/mcp.v1.McpMasterService/Status"
|
|
McpMasterService_ListNodes_FullMethodName = "/mcp.v1.McpMasterService/ListNodes"
|
|
)
|
|
|
|
// McpMasterServiceClient is the client API for McpMasterService 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.
|
|
//
|
|
// McpMasterService coordinates multi-node deployments. The CLI sends
|
|
// deploy/undeploy/status requests to the master, which places services on
|
|
// nodes, forwards to agents, and coordinates edge routing.
|
|
type McpMasterServiceClient interface {
|
|
// CLI operations.
|
|
Deploy(ctx context.Context, in *MasterDeployRequest, opts ...grpc.CallOption) (*MasterDeployResponse, error)
|
|
Undeploy(ctx context.Context, in *MasterUndeployRequest, opts ...grpc.CallOption) (*MasterUndeployResponse, error)
|
|
Status(ctx context.Context, in *MasterStatusRequest, opts ...grpc.CallOption) (*MasterStatusResponse, error)
|
|
ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error)
|
|
}
|
|
|
|
type mcpMasterServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewMcpMasterServiceClient(cc grpc.ClientConnInterface) McpMasterServiceClient {
|
|
return &mcpMasterServiceClient{cc}
|
|
}
|
|
|
|
func (c *mcpMasterServiceClient) Deploy(ctx context.Context, in *MasterDeployRequest, opts ...grpc.CallOption) (*MasterDeployResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(MasterDeployResponse)
|
|
err := c.cc.Invoke(ctx, McpMasterService_Deploy_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *mcpMasterServiceClient) Undeploy(ctx context.Context, in *MasterUndeployRequest, opts ...grpc.CallOption) (*MasterUndeployResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(MasterUndeployResponse)
|
|
err := c.cc.Invoke(ctx, McpMasterService_Undeploy_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *mcpMasterServiceClient) Status(ctx context.Context, in *MasterStatusRequest, opts ...grpc.CallOption) (*MasterStatusResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(MasterStatusResponse)
|
|
err := c.cc.Invoke(ctx, McpMasterService_Status_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *mcpMasterServiceClient) ListNodes(ctx context.Context, in *ListNodesRequest, opts ...grpc.CallOption) (*ListNodesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ListNodesResponse)
|
|
err := c.cc.Invoke(ctx, McpMasterService_ListNodes_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// McpMasterServiceServer is the server API for McpMasterService service.
|
|
// All implementations must embed UnimplementedMcpMasterServiceServer
|
|
// for forward compatibility.
|
|
//
|
|
// McpMasterService coordinates multi-node deployments. The CLI sends
|
|
// deploy/undeploy/status requests to the master, which places services on
|
|
// nodes, forwards to agents, and coordinates edge routing.
|
|
type McpMasterServiceServer interface {
|
|
// CLI operations.
|
|
Deploy(context.Context, *MasterDeployRequest) (*MasterDeployResponse, error)
|
|
Undeploy(context.Context, *MasterUndeployRequest) (*MasterUndeployResponse, error)
|
|
Status(context.Context, *MasterStatusRequest) (*MasterStatusResponse, error)
|
|
ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error)
|
|
mustEmbedUnimplementedMcpMasterServiceServer()
|
|
}
|
|
|
|
// UnimplementedMcpMasterServiceServer 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 UnimplementedMcpMasterServiceServer struct{}
|
|
|
|
func (UnimplementedMcpMasterServiceServer) Deploy(context.Context, *MasterDeployRequest) (*MasterDeployResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Deploy not implemented")
|
|
}
|
|
func (UnimplementedMcpMasterServiceServer) Undeploy(context.Context, *MasterUndeployRequest) (*MasterUndeployResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Undeploy not implemented")
|
|
}
|
|
func (UnimplementedMcpMasterServiceServer) Status(context.Context, *MasterStatusRequest) (*MasterStatusResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Status not implemented")
|
|
}
|
|
func (UnimplementedMcpMasterServiceServer) ListNodes(context.Context, *ListNodesRequest) (*ListNodesResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListNodes not implemented")
|
|
}
|
|
func (UnimplementedMcpMasterServiceServer) mustEmbedUnimplementedMcpMasterServiceServer() {}
|
|
func (UnimplementedMcpMasterServiceServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeMcpMasterServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to McpMasterServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeMcpMasterServiceServer interface {
|
|
mustEmbedUnimplementedMcpMasterServiceServer()
|
|
}
|
|
|
|
func RegisterMcpMasterServiceServer(s grpc.ServiceRegistrar, srv McpMasterServiceServer) {
|
|
// If the following call panics, it indicates UnimplementedMcpMasterServiceServer 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(&McpMasterService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _McpMasterService_Deploy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MasterDeployRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(McpMasterServiceServer).Deploy(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: McpMasterService_Deploy_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(McpMasterServiceServer).Deploy(ctx, req.(*MasterDeployRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _McpMasterService_Undeploy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MasterUndeployRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(McpMasterServiceServer).Undeploy(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: McpMasterService_Undeploy_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(McpMasterServiceServer).Undeploy(ctx, req.(*MasterUndeployRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _McpMasterService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(MasterStatusRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(McpMasterServiceServer).Status(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: McpMasterService_Status_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(McpMasterServiceServer).Status(ctx, req.(*MasterStatusRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _McpMasterService_ListNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ListNodesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(McpMasterServiceServer).ListNodes(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: McpMasterService_ListNodes_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(McpMasterServiceServer).ListNodes(ctx, req.(*ListNodesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// McpMasterService_ServiceDesc is the grpc.ServiceDesc for McpMasterService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var McpMasterService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "mcp.v1.McpMasterService",
|
|
HandlerType: (*McpMasterServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "Deploy",
|
|
Handler: _McpMasterService_Deploy_Handler,
|
|
},
|
|
{
|
|
MethodName: "Undeploy",
|
|
Handler: _McpMasterService_Undeploy_Handler,
|
|
},
|
|
{
|
|
MethodName: "Status",
|
|
Handler: _McpMasterService_Status_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListNodes",
|
|
Handler: _McpMasterService_ListNodes_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "proto/mcp/v1/master.proto",
|
|
}
|