Documentation
¶
Overview ¶
internal/compose/k8s_composer.go
internal/compose/lifecycle.go
internal/compose/toolbox.go
Index ¶
- func CreateToolbox(name, template, file, namespace string) error
- func DeleteToolbox(name, namespace string, removeVolumes, force bool) error
- func Down(configFile string, serviceNames []string) error
- func List(configFile string) error
- func ListToolboxTemplates(format, template string) error
- func ListToolboxes(namespace, format string) error
- func Logs(configFile string, serviceNames []string, follow bool) error
- func Restart(configFile string, serviceNames []string) error
- func Start(configFile string, serviceNames []string) error
- func StartToolbox(name, namespace string, wait bool, timeout time.Duration) error
- func Stop(configFile string, serviceNames []string) error
- func StopToolbox(name, namespace string, removeVolumes, force bool) error
- func ToolboxLogs(name, namespace, server string, follow bool, tail int) error
- func ToolboxStatus(name, namespace, format string, watch bool) error
- func Up(configFile string, serviceNames []string) error
- func Validate(configFile string) error
- type ComposeStatus
- type HealthChecker
- type K8sComposer
- func (c *K8sComposer) Down(serviceNames []string) error
- func (c *K8sComposer) Restart(serviceNames []string) error
- func (c *K8sComposer) Start(serviceNames []string) error
- func (c *K8sComposer) Status() (*ComposeStatus, error)
- func (c *K8sComposer) Stop(serviceNames []string) error
- func (c *K8sComposer) Up(serviceNames []string) error
- type LifecycleManager
- func (lm *LifecycleManager) ExecutePostStartHook(serverName string, hook string) error
- func (lm *LifecycleManager) ExecutePostStopHook(serverName string, hook string) error
- func (lm *LifecycleManager) ExecutePreStartHook(serverName string, hook string) error
- func (lm *LifecycleManager) ExecutePreStopHook(serverName string, hook string) error
- type ServiceStatus
- type ToolboxManager
- func (tm *ToolboxManager) CreateToolbox(name, template, file string) error
- func (tm *ToolboxManager) DeleteToolbox(name string, removeVolumes, force bool) error
- func (tm *ToolboxManager) ListToolboxTemplates(format, template string) error
- func (tm *ToolboxManager) ListToolboxes(format string) error
- func (tm *ToolboxManager) StartToolbox(name string, wait bool, timeout time.Duration) error
- func (tm *ToolboxManager) StopToolbox(name string, removeVolumes, force bool) error
- func (tm *ToolboxManager) ToolboxLogs(name, server string, follow bool, tail int) error
- func (tm *ToolboxManager) ToolboxStatus(name, format string, watch bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateToolbox ¶
CreateToolbox creates a new MCPToolbox resource
func DeleteToolbox ¶
DeleteToolbox deletes an MCPToolbox
func ListToolboxTemplates ¶
ListToolboxTemplates lists available toolbox templates
func ListToolboxes ¶
ListToolboxes lists all MCPToolbox resources
func StartToolbox ¶
StartToolbox starts an MCPToolbox
func StopToolbox ¶
StopToolbox stops an MCPToolbox
func ToolboxLogs ¶
ToolboxLogs shows logs from a toolbox
func ToolboxStatus ¶
ToolboxStatus shows status of a toolbox
Types ¶
type ComposeStatus ¶
type ComposeStatus struct {
Services map[string]*ServiceStatus `json:"services"`
}
ComposeStatus represents the status of all services
func Status ¶
func Status(configFile string) (*ComposeStatus, error)
Status returns the status of all services using system approach
type HealthChecker ¶
type HealthChecker struct {
// contains filtered or unexported fields
}
HealthChecker performs health checks on servers
func NewHealthChecker ¶
func NewHealthChecker(healthConfig config.HealthCheck, logger *logging.Logger, baseURL string) *HealthChecker
NewHealthChecker creates a new health checker
type K8sComposer ¶
type K8sComposer struct {
// contains filtered or unexported fields
}
K8sComposer orchestrates MCP services using Kubernetes resources
func NewK8sComposer ¶
func NewK8sComposer(configPath string, namespace string) (*K8sComposer, error)
NewK8sComposer creates a new composer instance
func (*K8sComposer) Down ¶
func (c *K8sComposer) Down(serviceNames []string) error
Down stops all services
func (*K8sComposer) Restart ¶
func (c *K8sComposer) Restart(serviceNames []string) error
Restart restarts specific services or all services if none specified
func (*K8sComposer) Start ¶
func (c *K8sComposer) Start(serviceNames []string) error
Start starts specific services
func (*K8sComposer) Status ¶
func (c *K8sComposer) Status() (*ComposeStatus, error)
Status returns the status of all services
func (*K8sComposer) Stop ¶
func (c *K8sComposer) Stop(serviceNames []string) error
Stop stops specific services
func (*K8sComposer) Up ¶
func (c *K8sComposer) Up(serviceNames []string) error
Up starts all enabled services
type LifecycleManager ¶
type LifecycleManager struct {
// contains filtered or unexported fields
}
LifecycleManager handles pre/post hooks and health checks
func NewLifecycleManager ¶
func NewLifecycleManager(cfg *config.ComposeConfig, logger *logging.Logger, projectDir string) *LifecycleManager
NewLifecycleManager creates a new lifecycle manager
func (*LifecycleManager) ExecutePostStartHook ¶
func (lm *LifecycleManager) ExecutePostStartHook(serverName string, hook string) error
ExecutePostStartHook executes post-start lifecycle hook
func (*LifecycleManager) ExecutePostStopHook ¶
func (lm *LifecycleManager) ExecutePostStopHook(serverName string, hook string) error
ExecutePostStopHook executes post-stop lifecycle hook
func (*LifecycleManager) ExecutePreStartHook ¶
func (lm *LifecycleManager) ExecutePreStartHook(serverName string, hook string) error
ExecutePreStartHook executes pre-start lifecycle hook
func (*LifecycleManager) ExecutePreStopHook ¶
func (lm *LifecycleManager) ExecutePreStopHook(serverName string, hook string) error
ExecutePreStopHook executes pre-stop lifecycle hook
type ServiceStatus ¶
type ServiceStatus struct {
Name string `json:"name"`
Status string `json:"status"`
Type string `json:"type"`
}
ServiceStatus represents the status of a single service
type ToolboxManager ¶
type ToolboxManager struct {
// contains filtered or unexported fields
}
ToolboxManager manages MCPToolbox resources
func NewToolboxManager ¶
func NewToolboxManager(namespace string) (*ToolboxManager, error)
NewToolboxManager creates a new toolbox manager
func (*ToolboxManager) CreateToolbox ¶
func (tm *ToolboxManager) CreateToolbox(name, template, file string) error
CreateToolbox creates a new MCPToolbox resource
func (*ToolboxManager) DeleteToolbox ¶
func (tm *ToolboxManager) DeleteToolbox(name string, removeVolumes, force bool) error
DeleteToolbox deletes an MCPToolbox
func (*ToolboxManager) ListToolboxTemplates ¶
func (tm *ToolboxManager) ListToolboxTemplates(format, template string) error
ListToolboxTemplates lists available toolbox templates
func (*ToolboxManager) ListToolboxes ¶
func (tm *ToolboxManager) ListToolboxes(format string) error
ListToolboxes lists all MCPToolbox resources
func (*ToolboxManager) StartToolbox ¶
StartToolbox starts an MCPToolbox (it should already be running via controller)
func (*ToolboxManager) StopToolbox ¶
func (tm *ToolboxManager) StopToolbox(name string, removeVolumes, force bool) error
StopToolbox stops an MCPToolbox by deleting it
func (*ToolboxManager) ToolboxLogs ¶
func (tm *ToolboxManager) ToolboxLogs(name, server string, follow bool, tail int) error
ToolboxLogs shows logs from a toolbox
func (*ToolboxManager) ToolboxStatus ¶
func (tm *ToolboxManager) ToolboxStatus(name, format string, watch bool) error
ToolboxStatus shows status of a toolbox