Add McpMasterService proto and v2 ServiceSpec fields
- 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>
This commit is contained in:
849
gen/mcp/v1/master.pb.go
Normal file
849
gen/mcp/v1/master.pb.go
Normal file
@@ -0,0 +1,849 @@
|
|||||||
|
// McpMasterService: Multi-node orchestration for the Metacircular platform.
|
||||||
|
|
||||||
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
|
// versions:
|
||||||
|
// protoc-gen-go v1.36.11
|
||||||
|
// protoc v6.32.1
|
||||||
|
// source: proto/mcp/v1/master.proto
|
||||||
|
|
||||||
|
package mcpv1
|
||||||
|
|
||||||
|
import (
|
||||||
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
|
reflect "reflect"
|
||||||
|
sync "sync"
|
||||||
|
unsafe "unsafe"
|
||||||
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
// Verify that this generated code is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||||
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||||
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
type MasterDeployRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Service *ServiceSpec `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployRequest) Reset() {
|
||||||
|
*x = MasterDeployRequest{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[0]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MasterDeployRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MasterDeployRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[0]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MasterDeployRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MasterDeployRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployRequest) GetService() *ServiceSpec {
|
||||||
|
if x != nil {
|
||||||
|
return x.Service
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type MasterDeployResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` // node the service was placed on
|
||||||
|
Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // true only if ALL steps succeeded
|
||||||
|
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
|
// Per-step results for operator visibility.
|
||||||
|
DeployResult *StepResult `protobuf:"bytes,4,opt,name=deploy_result,json=deployResult,proto3" json:"deploy_result,omitempty"`
|
||||||
|
EdgeRouteResult *StepResult `protobuf:"bytes,5,opt,name=edge_route_result,json=edgeRouteResult,proto3" json:"edge_route_result,omitempty"`
|
||||||
|
DnsResult *StepResult `protobuf:"bytes,6,opt,name=dns_result,json=dnsResult,proto3" json:"dns_result,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) Reset() {
|
||||||
|
*x = MasterDeployResponse{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[1]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MasterDeployResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[1]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MasterDeployResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MasterDeployResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{1}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) GetNode() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Node
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) GetDeployResult() *StepResult {
|
||||||
|
if x != nil {
|
||||||
|
return x.DeployResult
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) GetEdgeRouteResult() *StepResult {
|
||||||
|
if x != nil {
|
||||||
|
return x.EdgeRouteResult
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterDeployResponse) GetDnsResult() *StepResult {
|
||||||
|
if x != nil {
|
||||||
|
return x.DnsResult
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type StepResult struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Step string `protobuf:"bytes,1,opt,name=step,proto3" json:"step,omitempty"`
|
||||||
|
Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *StepResult) Reset() {
|
||||||
|
*x = StepResult{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[2]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *StepResult) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*StepResult) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *StepResult) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[2]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use StepResult.ProtoReflect.Descriptor instead.
|
||||||
|
func (*StepResult) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{2}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *StepResult) GetStep() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Step
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *StepResult) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *StepResult) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type MasterUndeployRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterUndeployRequest) Reset() {
|
||||||
|
*x = MasterUndeployRequest{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[3]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterUndeployRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MasterUndeployRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MasterUndeployRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[3]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MasterUndeployRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MasterUndeployRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{3}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterUndeployRequest) GetServiceName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServiceName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type MasterUndeployResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||||
|
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterUndeployResponse) Reset() {
|
||||||
|
*x = MasterUndeployResponse{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[4]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterUndeployResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MasterUndeployResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MasterUndeployResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[4]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MasterUndeployResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MasterUndeployResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{4}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterUndeployResponse) GetSuccess() bool {
|
||||||
|
if x != nil {
|
||||||
|
return x.Success
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterUndeployResponse) GetError() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Error
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type MasterStatusRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
ServiceName string `protobuf:"bytes,1,opt,name=service_name,json=serviceName,proto3" json:"service_name,omitempty"` // empty = all services
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterStatusRequest) Reset() {
|
||||||
|
*x = MasterStatusRequest{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[5]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterStatusRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MasterStatusRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MasterStatusRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[5]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MasterStatusRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MasterStatusRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{5}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterStatusRequest) GetServiceName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.ServiceName
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type MasterStatusResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Services []*ServiceStatus `protobuf:"bytes,1,rep,name=services,proto3" json:"services,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterStatusResponse) Reset() {
|
||||||
|
*x = MasterStatusResponse{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[6]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterStatusResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*MasterStatusResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *MasterStatusResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[6]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use MasterStatusResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*MasterStatusResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{6}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MasterStatusResponse) GetServices() []*ServiceStatus {
|
||||||
|
if x != nil {
|
||||||
|
return x.Services
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type ServiceStatus struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
|
Node string `protobuf:"bytes,2,opt,name=node,proto3" json:"node,omitempty"`
|
||||||
|
Tier string `protobuf:"bytes,3,opt,name=tier,proto3" json:"tier,omitempty"`
|
||||||
|
Status string `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"` // "running", "stopped", "unhealthy", "unknown"
|
||||||
|
EdgeRoutes []*EdgeRouteStatus `protobuf:"bytes,5,rep,name=edge_routes,json=edgeRoutes,proto3" json:"edge_routes,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) Reset() {
|
||||||
|
*x = ServiceStatus{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[7]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ServiceStatus) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[7]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ServiceStatus.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ServiceStatus) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{7}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) GetName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Name
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) GetNode() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Node
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) GetTier() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Tier
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) GetStatus() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Status
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ServiceStatus) GetEdgeRoutes() []*EdgeRouteStatus {
|
||||||
|
if x != nil {
|
||||||
|
return x.EdgeRoutes
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type EdgeRouteStatus struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Hostname string `protobuf:"bytes,1,opt,name=hostname,proto3" json:"hostname,omitempty"`
|
||||||
|
EdgeNode string `protobuf:"bytes,2,opt,name=edge_node,json=edgeNode,proto3" json:"edge_node,omitempty"`
|
||||||
|
CertExpires string `protobuf:"bytes,3,opt,name=cert_expires,json=certExpires,proto3" json:"cert_expires,omitempty"` // RFC3339
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EdgeRouteStatus) Reset() {
|
||||||
|
*x = EdgeRouteStatus{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[8]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EdgeRouteStatus) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*EdgeRouteStatus) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *EdgeRouteStatus) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[8]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use EdgeRouteStatus.ProtoReflect.Descriptor instead.
|
||||||
|
func (*EdgeRouteStatus) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{8}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EdgeRouteStatus) GetHostname() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Hostname
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EdgeRouteStatus) GetEdgeNode() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.EdgeNode
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *EdgeRouteStatus) GetCertExpires() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.CertExpires
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListNodesRequest struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListNodesRequest) Reset() {
|
||||||
|
*x = ListNodesRequest{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[9]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListNodesRequest) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListNodesRequest) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListNodesRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[9]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ListNodesRequest.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListNodesRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{9}
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListNodesResponse struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Nodes []*NodeInfo `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListNodesResponse) Reset() {
|
||||||
|
*x = ListNodesResponse{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[10]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListNodesResponse) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*ListNodesResponse) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *ListNodesResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[10]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use ListNodesResponse.ProtoReflect.Descriptor instead.
|
||||||
|
func (*ListNodesResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{10}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *ListNodesResponse) GetNodes() []*NodeInfo {
|
||||||
|
if x != nil {
|
||||||
|
return x.Nodes
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type NodeInfo struct {
|
||||||
|
state protoimpl.MessageState `protogen:"open.v1"`
|
||||||
|
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||||
|
Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"`
|
||||||
|
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
|
||||||
|
Arch string `protobuf:"bytes,4,opt,name=arch,proto3" json:"arch,omitempty"`
|
||||||
|
Status string `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"` // "healthy", "unhealthy", "unknown"
|
||||||
|
Containers int32 `protobuf:"varint,6,opt,name=containers,proto3" json:"containers,omitempty"`
|
||||||
|
LastHeartbeat string `protobuf:"bytes,7,opt,name=last_heartbeat,json=lastHeartbeat,proto3" json:"last_heartbeat,omitempty"` // RFC3339
|
||||||
|
Services int32 `protobuf:"varint,8,opt,name=services,proto3" json:"services,omitempty"` // placement count
|
||||||
|
unknownFields protoimpl.UnknownFields
|
||||||
|
sizeCache protoimpl.SizeCache
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) Reset() {
|
||||||
|
*x = NodeInfo{}
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[11]
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) String() string {
|
||||||
|
return protoimpl.X.MessageStringOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (*NodeInfo) ProtoMessage() {}
|
||||||
|
|
||||||
|
func (x *NodeInfo) ProtoReflect() protoreflect.Message {
|
||||||
|
mi := &file_proto_mcp_v1_master_proto_msgTypes[11]
|
||||||
|
if x != nil {
|
||||||
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
ms.StoreMessageInfo(mi)
|
||||||
|
}
|
||||||
|
return ms
|
||||||
|
}
|
||||||
|
return mi.MessageOf(x)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Deprecated: Use NodeInfo.ProtoReflect.Descriptor instead.
|
||||||
|
func (*NodeInfo) Descriptor() ([]byte, []int) {
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescGZIP(), []int{11}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetName() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Name
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetRole() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Role
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetAddress() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Address
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetArch() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Arch
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetStatus() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Status
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetContainers() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Containers
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetLastHeartbeat() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.LastHeartbeat
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *NodeInfo) GetServices() int32 {
|
||||||
|
if x != nil {
|
||||||
|
return x.Services
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
var File_proto_mcp_v1_master_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
|
const file_proto_mcp_v1_master_proto_rawDesc = "" +
|
||||||
|
"\n" +
|
||||||
|
"\x19proto/mcp/v1/master.proto\x12\x06mcp.v1\x1a\x16proto/mcp/v1/mcp.proto\"D\n" +
|
||||||
|
"\x13MasterDeployRequest\x12-\n" +
|
||||||
|
"\aservice\x18\x01 \x01(\v2\x13.mcp.v1.ServiceSpecR\aservice\"\x86\x02\n" +
|
||||||
|
"\x14MasterDeployResponse\x12\x12\n" +
|
||||||
|
"\x04node\x18\x01 \x01(\tR\x04node\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x02 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x03 \x01(\tR\x05error\x127\n" +
|
||||||
|
"\rdeploy_result\x18\x04 \x01(\v2\x12.mcp.v1.StepResultR\fdeployResult\x12>\n" +
|
||||||
|
"\x11edge_route_result\x18\x05 \x01(\v2\x12.mcp.v1.StepResultR\x0fedgeRouteResult\x121\n" +
|
||||||
|
"\n" +
|
||||||
|
"dns_result\x18\x06 \x01(\v2\x12.mcp.v1.StepResultR\tdnsResult\"P\n" +
|
||||||
|
"\n" +
|
||||||
|
"StepResult\x12\x12\n" +
|
||||||
|
"\x04step\x18\x01 \x01(\tR\x04step\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x02 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x03 \x01(\tR\x05error\":\n" +
|
||||||
|
"\x15MasterUndeployRequest\x12!\n" +
|
||||||
|
"\fservice_name\x18\x01 \x01(\tR\vserviceName\"H\n" +
|
||||||
|
"\x16MasterUndeployResponse\x12\x18\n" +
|
||||||
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12\x14\n" +
|
||||||
|
"\x05error\x18\x02 \x01(\tR\x05error\"8\n" +
|
||||||
|
"\x13MasterStatusRequest\x12!\n" +
|
||||||
|
"\fservice_name\x18\x01 \x01(\tR\vserviceName\"I\n" +
|
||||||
|
"\x14MasterStatusResponse\x121\n" +
|
||||||
|
"\bservices\x18\x01 \x03(\v2\x15.mcp.v1.ServiceStatusR\bservices\"\x9d\x01\n" +
|
||||||
|
"\rServiceStatus\x12\x12\n" +
|
||||||
|
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
|
||||||
|
"\x04node\x18\x02 \x01(\tR\x04node\x12\x12\n" +
|
||||||
|
"\x04tier\x18\x03 \x01(\tR\x04tier\x12\x16\n" +
|
||||||
|
"\x06status\x18\x04 \x01(\tR\x06status\x128\n" +
|
||||||
|
"\vedge_routes\x18\x05 \x03(\v2\x17.mcp.v1.EdgeRouteStatusR\n" +
|
||||||
|
"edgeRoutes\"m\n" +
|
||||||
|
"\x0fEdgeRouteStatus\x12\x1a\n" +
|
||||||
|
"\bhostname\x18\x01 \x01(\tR\bhostname\x12\x1b\n" +
|
||||||
|
"\tedge_node\x18\x02 \x01(\tR\bedgeNode\x12!\n" +
|
||||||
|
"\fcert_expires\x18\x03 \x01(\tR\vcertExpires\"\x12\n" +
|
||||||
|
"\x10ListNodesRequest\";\n" +
|
||||||
|
"\x11ListNodesResponse\x12&\n" +
|
||||||
|
"\x05nodes\x18\x01 \x03(\v2\x10.mcp.v1.NodeInfoR\x05nodes\"\xdb\x01\n" +
|
||||||
|
"\bNodeInfo\x12\x12\n" +
|
||||||
|
"\x04name\x18\x01 \x01(\tR\x04name\x12\x12\n" +
|
||||||
|
"\x04role\x18\x02 \x01(\tR\x04role\x12\x18\n" +
|
||||||
|
"\aaddress\x18\x03 \x01(\tR\aaddress\x12\x12\n" +
|
||||||
|
"\x04arch\x18\x04 \x01(\tR\x04arch\x12\x16\n" +
|
||||||
|
"\x06status\x18\x05 \x01(\tR\x06status\x12\x1e\n" +
|
||||||
|
"\n" +
|
||||||
|
"containers\x18\x06 \x01(\x05R\n" +
|
||||||
|
"containers\x12%\n" +
|
||||||
|
"\x0elast_heartbeat\x18\a \x01(\tR\rlastHeartbeat\x12\x1a\n" +
|
||||||
|
"\bservices\x18\b \x01(\x05R\bservices2\xa9\x02\n" +
|
||||||
|
"\x10McpMasterService\x12C\n" +
|
||||||
|
"\x06Deploy\x12\x1b.mcp.v1.MasterDeployRequest\x1a\x1c.mcp.v1.MasterDeployResponse\x12I\n" +
|
||||||
|
"\bUndeploy\x12\x1d.mcp.v1.MasterUndeployRequest\x1a\x1e.mcp.v1.MasterUndeployResponse\x12C\n" +
|
||||||
|
"\x06Status\x12\x1b.mcp.v1.MasterStatusRequest\x1a\x1c.mcp.v1.MasterStatusResponse\x12@\n" +
|
||||||
|
"\tListNodes\x12\x18.mcp.v1.ListNodesRequest\x1a\x19.mcp.v1.ListNodesResponseB*Z(git.wntrmute.dev/mc/mcp/gen/mcp/v1;mcpv1b\x06proto3"
|
||||||
|
|
||||||
|
var (
|
||||||
|
file_proto_mcp_v1_master_proto_rawDescOnce sync.Once
|
||||||
|
file_proto_mcp_v1_master_proto_rawDescData []byte
|
||||||
|
)
|
||||||
|
|
||||||
|
func file_proto_mcp_v1_master_proto_rawDescGZIP() []byte {
|
||||||
|
file_proto_mcp_v1_master_proto_rawDescOnce.Do(func() {
|
||||||
|
file_proto_mcp_v1_master_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_proto_mcp_v1_master_proto_rawDesc), len(file_proto_mcp_v1_master_proto_rawDesc)))
|
||||||
|
})
|
||||||
|
return file_proto_mcp_v1_master_proto_rawDescData
|
||||||
|
}
|
||||||
|
|
||||||
|
var file_proto_mcp_v1_master_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||||
|
var file_proto_mcp_v1_master_proto_goTypes = []any{
|
||||||
|
(*MasterDeployRequest)(nil), // 0: mcp.v1.MasterDeployRequest
|
||||||
|
(*MasterDeployResponse)(nil), // 1: mcp.v1.MasterDeployResponse
|
||||||
|
(*StepResult)(nil), // 2: mcp.v1.StepResult
|
||||||
|
(*MasterUndeployRequest)(nil), // 3: mcp.v1.MasterUndeployRequest
|
||||||
|
(*MasterUndeployResponse)(nil), // 4: mcp.v1.MasterUndeployResponse
|
||||||
|
(*MasterStatusRequest)(nil), // 5: mcp.v1.MasterStatusRequest
|
||||||
|
(*MasterStatusResponse)(nil), // 6: mcp.v1.MasterStatusResponse
|
||||||
|
(*ServiceStatus)(nil), // 7: mcp.v1.ServiceStatus
|
||||||
|
(*EdgeRouteStatus)(nil), // 8: mcp.v1.EdgeRouteStatus
|
||||||
|
(*ListNodesRequest)(nil), // 9: mcp.v1.ListNodesRequest
|
||||||
|
(*ListNodesResponse)(nil), // 10: mcp.v1.ListNodesResponse
|
||||||
|
(*NodeInfo)(nil), // 11: mcp.v1.NodeInfo
|
||||||
|
(*ServiceSpec)(nil), // 12: mcp.v1.ServiceSpec
|
||||||
|
}
|
||||||
|
var file_proto_mcp_v1_master_proto_depIdxs = []int32{
|
||||||
|
12, // 0: mcp.v1.MasterDeployRequest.service:type_name -> mcp.v1.ServiceSpec
|
||||||
|
2, // 1: mcp.v1.MasterDeployResponse.deploy_result:type_name -> mcp.v1.StepResult
|
||||||
|
2, // 2: mcp.v1.MasterDeployResponse.edge_route_result:type_name -> mcp.v1.StepResult
|
||||||
|
2, // 3: mcp.v1.MasterDeployResponse.dns_result:type_name -> mcp.v1.StepResult
|
||||||
|
7, // 4: mcp.v1.MasterStatusResponse.services:type_name -> mcp.v1.ServiceStatus
|
||||||
|
8, // 5: mcp.v1.ServiceStatus.edge_routes:type_name -> mcp.v1.EdgeRouteStatus
|
||||||
|
11, // 6: mcp.v1.ListNodesResponse.nodes:type_name -> mcp.v1.NodeInfo
|
||||||
|
0, // 7: mcp.v1.McpMasterService.Deploy:input_type -> mcp.v1.MasterDeployRequest
|
||||||
|
3, // 8: mcp.v1.McpMasterService.Undeploy:input_type -> mcp.v1.MasterUndeployRequest
|
||||||
|
5, // 9: mcp.v1.McpMasterService.Status:input_type -> mcp.v1.MasterStatusRequest
|
||||||
|
9, // 10: mcp.v1.McpMasterService.ListNodes:input_type -> mcp.v1.ListNodesRequest
|
||||||
|
1, // 11: mcp.v1.McpMasterService.Deploy:output_type -> mcp.v1.MasterDeployResponse
|
||||||
|
4, // 12: mcp.v1.McpMasterService.Undeploy:output_type -> mcp.v1.MasterUndeployResponse
|
||||||
|
6, // 13: mcp.v1.McpMasterService.Status:output_type -> mcp.v1.MasterStatusResponse
|
||||||
|
10, // 14: mcp.v1.McpMasterService.ListNodes:output_type -> mcp.v1.ListNodesResponse
|
||||||
|
11, // [11:15] is the sub-list for method output_type
|
||||||
|
7, // [7:11] is the sub-list for method input_type
|
||||||
|
7, // [7:7] is the sub-list for extension type_name
|
||||||
|
7, // [7:7] is the sub-list for extension extendee
|
||||||
|
0, // [0:7] is the sub-list for field type_name
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { file_proto_mcp_v1_master_proto_init() }
|
||||||
|
func file_proto_mcp_v1_master_proto_init() {
|
||||||
|
if File_proto_mcp_v1_master_proto != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
file_proto_mcp_v1_mcp_proto_init()
|
||||||
|
type x struct{}
|
||||||
|
out := protoimpl.TypeBuilder{
|
||||||
|
File: protoimpl.DescBuilder{
|
||||||
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_proto_mcp_v1_master_proto_rawDesc), len(file_proto_mcp_v1_master_proto_rawDesc)),
|
||||||
|
NumEnums: 0,
|
||||||
|
NumMessages: 12,
|
||||||
|
NumExtensions: 0,
|
||||||
|
NumServices: 1,
|
||||||
|
},
|
||||||
|
GoTypes: file_proto_mcp_v1_master_proto_goTypes,
|
||||||
|
DependencyIndexes: file_proto_mcp_v1_master_proto_depIdxs,
|
||||||
|
MessageInfos: file_proto_mcp_v1_master_proto_msgTypes,
|
||||||
|
}.Build()
|
||||||
|
File_proto_mcp_v1_master_proto = out.File
|
||||||
|
file_proto_mcp_v1_master_proto_goTypes = nil
|
||||||
|
file_proto_mcp_v1_master_proto_depIdxs = nil
|
||||||
|
}
|
||||||
247
gen/mcp/v1/master_grpc.pb.go
Normal file
247
gen/mcp/v1/master_grpc.pb.go
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
// 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",
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
95
proto/mcp/v1/master.proto
Normal file
95
proto/mcp/v1/master.proto
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
// McpMasterService: Multi-node orchestration for the Metacircular platform.
|
||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package mcp.v1;
|
||||||
|
|
||||||
|
option go_package = "git.wntrmute.dev/mc/mcp/gen/mcp/v1;mcpv1";
|
||||||
|
|
||||||
|
import "proto/mcp/v1/mcp.proto";
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
service McpMasterService {
|
||||||
|
// CLI operations.
|
||||||
|
rpc Deploy(MasterDeployRequest) returns (MasterDeployResponse);
|
||||||
|
rpc Undeploy(MasterUndeployRequest) returns (MasterUndeployResponse);
|
||||||
|
rpc Status(MasterStatusRequest) returns (MasterStatusResponse);
|
||||||
|
rpc ListNodes(ListNodesRequest) returns (ListNodesResponse);
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Deploy ---
|
||||||
|
|
||||||
|
message MasterDeployRequest {
|
||||||
|
ServiceSpec service = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MasterDeployResponse {
|
||||||
|
string node = 1; // node the service was placed on
|
||||||
|
bool success = 2; // true only if ALL steps succeeded
|
||||||
|
string error = 3;
|
||||||
|
// Per-step results for operator visibility.
|
||||||
|
StepResult deploy_result = 4;
|
||||||
|
StepResult edge_route_result = 5;
|
||||||
|
StepResult dns_result = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
message StepResult {
|
||||||
|
string step = 1;
|
||||||
|
bool success = 2;
|
||||||
|
string error = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Undeploy ---
|
||||||
|
|
||||||
|
message MasterUndeployRequest {
|
||||||
|
string service_name = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message MasterUndeployResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string error = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Status ---
|
||||||
|
|
||||||
|
message MasterStatusRequest {
|
||||||
|
string service_name = 1; // empty = all services
|
||||||
|
}
|
||||||
|
|
||||||
|
message MasterStatusResponse {
|
||||||
|
repeated ServiceStatus services = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message ServiceStatus {
|
||||||
|
string name = 1;
|
||||||
|
string node = 2;
|
||||||
|
string tier = 3;
|
||||||
|
string status = 4; // "running", "stopped", "unhealthy", "unknown"
|
||||||
|
repeated EdgeRouteStatus edge_routes = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
message EdgeRouteStatus {
|
||||||
|
string hostname = 1;
|
||||||
|
string edge_node = 2;
|
||||||
|
string cert_expires = 3; // RFC3339
|
||||||
|
}
|
||||||
|
|
||||||
|
// --- Nodes ---
|
||||||
|
|
||||||
|
message ListNodesRequest {}
|
||||||
|
|
||||||
|
message ListNodesResponse {
|
||||||
|
repeated NodeInfo nodes = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message NodeInfo {
|
||||||
|
string name = 1;
|
||||||
|
string role = 2;
|
||||||
|
string address = 3;
|
||||||
|
string arch = 4;
|
||||||
|
string status = 5; // "healthy", "unhealthy", "unknown"
|
||||||
|
int32 containers = 6;
|
||||||
|
string last_heartbeat = 7; // RFC3339
|
||||||
|
int32 services = 8; // placement count
|
||||||
|
}
|
||||||
@@ -61,6 +61,7 @@ message RouteSpec {
|
|||||||
int32 port = 2; // mc-proxy listener port (e.g. 443, 8443, 9443); NOT the container internal port
|
int32 port = 2; // mc-proxy listener port (e.g. 443, 8443, 9443); NOT the container internal port
|
||||||
string mode = 3; // "l4" or "l7"
|
string mode = 3; // "l4" or "l7"
|
||||||
string hostname = 4; // optional public hostname override
|
string hostname = 4; // optional public hostname override
|
||||||
|
bool public = 5; // triggers edge routing when true
|
||||||
}
|
}
|
||||||
|
|
||||||
message ComponentSpec {
|
message ComponentSpec {
|
||||||
@@ -76,11 +77,19 @@ message ComponentSpec {
|
|||||||
repeated string env = 10;
|
repeated string env = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message SnapshotConfig {
|
||||||
|
string method = 1; // "grpc", "cli", "exec: <cmd>", "full", or "" (default)
|
||||||
|
repeated string excludes = 2; // paths relative to /srv/<service>/ to skip
|
||||||
|
}
|
||||||
|
|
||||||
message ServiceSpec {
|
message ServiceSpec {
|
||||||
string name = 1;
|
string name = 1;
|
||||||
bool active = 2;
|
bool active = 2;
|
||||||
repeated ComponentSpec components = 3;
|
repeated ComponentSpec components = 3;
|
||||||
string comment = 4;
|
string comment = 4;
|
||||||
|
string tier = 5; // "core" or "worker" (default: "worker")
|
||||||
|
string node = 6; // explicit node pin (overrides tier)
|
||||||
|
SnapshotConfig snapshot = 7; // snapshot method and excludes
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeployRequest {
|
message DeployRequest {
|
||||||
|
|||||||
Reference in New Issue
Block a user