Add component-level targeting to start, stop, and restart
Allow start/stop/restart to target a single component via <service>/<component> syntax, matching deploy/logs/purge. When a component is specified, start/stop skip toggling the service-level active flag. Agent-side filtering returns NotFound for unknown components. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -426,6 +426,7 @@ func (x *ComponentResult) GetError() string {
|
||||
type StopServiceRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Component string `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -467,6 +468,13 @@ func (x *StopServiceRequest) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *StopServiceRequest) GetComponent() string {
|
||||
if x != nil {
|
||||
return x.Component
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type StopServiceResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Results []*ComponentResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
|
||||
@@ -514,6 +522,7 @@ func (x *StopServiceResponse) GetResults() []*ComponentResult {
|
||||
type StartServiceRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Component string `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -555,6 +564,13 @@ func (x *StartServiceRequest) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *StartServiceRequest) GetComponent() string {
|
||||
if x != nil {
|
||||
return x.Component
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type StartServiceResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Results []*ComponentResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
|
||||
@@ -602,6 +618,7 @@ func (x *StartServiceResponse) GetResults() []*ComponentResult {
|
||||
type RestartServiceRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Component string `protobuf:"bytes,2,opt,name=component,proto3" json:"component,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
@@ -643,6 +660,13 @@ func (x *RestartServiceRequest) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *RestartServiceRequest) GetComponent() string {
|
||||
if x != nil {
|
||||
return x.Component
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type RestartServiceResponse struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Results []*ComponentResult `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
|
||||
@@ -3060,17 +3084,20 @@ const file_proto_mcp_v1_mcp_proto_rawDesc = "" +
|
||||
"\x0fComponentResult\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" +
|
||||
"\asuccess\x18\x02 \x01(\bR\asuccess\x12\x14\n" +
|
||||
"\x05error\x18\x03 \x01(\tR\x05error\"(\n" +
|
||||
"\x05error\x18\x03 \x01(\tR\x05error\"F\n" +
|
||||
"\x12StopServiceRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\"H\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n" +
|
||||
"\tcomponent\x18\x02 \x01(\tR\tcomponent\"H\n" +
|
||||
"\x13StopServiceResponse\x121\n" +
|
||||
"\aresults\x18\x01 \x03(\v2\x17.mcp.v1.ComponentResultR\aresults\")\n" +
|
||||
"\aresults\x18\x01 \x03(\v2\x17.mcp.v1.ComponentResultR\aresults\"G\n" +
|
||||
"\x13StartServiceRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\"I\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n" +
|
||||
"\tcomponent\x18\x02 \x01(\tR\tcomponent\"I\n" +
|
||||
"\x14StartServiceResponse\x121\n" +
|
||||
"\aresults\x18\x01 \x03(\v2\x17.mcp.v1.ComponentResultR\aresults\"+\n" +
|
||||
"\aresults\x18\x01 \x03(\v2\x17.mcp.v1.ComponentResultR\aresults\"I\n" +
|
||||
"\x15RestartServiceRequest\x12\x12\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\"K\n" +
|
||||
"\x04name\x18\x01 \x01(\tR\x04name\x12\x1c\n" +
|
||||
"\tcomponent\x18\x02 \x01(\tR\tcomponent\"K\n" +
|
||||
"\x16RestartServiceResponse\x121\n" +
|
||||
"\aresults\x18\x01 \x03(\v2\x17.mcp.v1.ComponentResultR\aresults\",\n" +
|
||||
"\x16UndeployServiceRequest\x12\x12\n" +
|
||||
|
||||
Reference in New Issue
Block a user