Documentation
¶
Index ¶
Constants ¶
const ( // ConfigGetTool MCP config get tool name. ConfigGetTool = constants.AppName + "_config_get" // ConfigInitTool initializes the cluster configuration. ConfigInitTool = constants.AppName + "_config_init" // ConfigSettings manipulates global settings. ConfigSettings = constants.AppName + "_config_settings" // ConfigProductEnabled manipulates the status of a product. ConfigProductEnabled = constants.AppName + "_config_product_enabled" // ConfigProductNamespace manipulates the namespace of a product. ConfigProductNamespace = constants.AppName + "_config_product_namespace" // ConfigProductProperties manipulates the properties of a product. ConfigProductProperties = constants.AppName + "_config_product_properties" )
const ( NamespaceArg = "namespace" KeyArg = "key" ValueArg = "value" NameArg = "name" EnabledArg = "enabled" PropertiesArg = "properties" )
Arguments for the config tools.
const ( // DeployToolName deploy tool name. DeployToolName = constants.AppName + "_deploy" // DebugArg enables debug mode for the deployment job. DebugArg = "debug" // DryRunArg runs the deployment job on dry-run. DryRunArg = "dry-run" // ForceArg forces the recreation of the deployment job. ForceArg = "force" )
const ( // IntegrationListTool list integrations tool. IntegrationListTool = constants.AppName + "_integration_list" // IntegrationScaffoldTool generates the `tssc integration` command // required to configure the integration type IntegrationScaffoldTool = constants.AppName + "_integration_scaffold" // IntegrationStatusTool checks if integrations are configured. IntegrationStatusTool = constants.AppName + "_integration_status" )
const ( // StatusToolName MCP status tool name. StatusToolName = constants.AppName + "_status" // AwaitingConfigurationPhase first step, the cluster is not configured yet. AwaitingConfigurationPhase = "AWAITING_CONFIGURATION" // AwaitingIntegrationsPhase second step, the cluster doesn't have the // required integrations configured yet. AwaitingIntegrationsPhase = "AWAITING_INTEGRATIONS" // ReadyToDeployPhase third step, the cluster is ready to deploy. It's // configured and has all required integrations in place. ReadyToDeployPhase = "READY_TO_DEPLOY" // DeployingPhase fourth step, the installer is currently deploying the // dependencies, Helm charts. DeployingPhase = "DEPLOYING" // CompletedPhase final step, the installation process is complete, and the // cluster is ready. CompletedPhase = "COMPLETED" // InstallerErrorPhase indicates an error occurred while trying to determine // the installer's operational status (e.g., failed to get job state). InstallerErrorPhase = "INSTALLER_ERROR" )
const (
NamesArg = "names"
)
Arguments for the integration tools.
const ( // NotesToolName retrieves the connection instruction for a product. NotesToolName = constants.AppName + "_notes" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigTools ¶
type ConfigTools struct {
// contains filtered or unexported fields
}
ConfigTools represents a set of tools for managing the TSSC configuration in a Kubernetes cluster via MCP tools. Each tool is a function that handles a specific role in the TSSC configuration lifecycle. Analogous to the "tssc config" subcommand it uses the ConfigManager to manage the TSSC configuration in the cluster.
func NewConfigTools ¶
func NewConfigTools( logger *slog.Logger, kube *k8s.Kube, cm *config.ConfigMapManager, ) (*ConfigTools, error)
NewConfigTools instantiates a new ConfigTools.
func (*ConfigTools) Init ¶
func (c *ConfigTools) Init(s *server.MCPServer)
Init registers the ConfigTools on the provided MCP server instance.
type DeployTools ¶
type DeployTools struct {
// contains filtered or unexported fields
}
DeployTools represents the tools used for deploying the TSSC using the installer on a container image, and running in the cluster, using a Kubernetes Job.
func NewDeployTools ¶
func NewDeployTools( cm *config.ConfigMapManager, topologyBuilder *resolver.TopologyBuilder, job *installer.Job, image string, ) *DeployTools
NewDeployTools creates a new DeployTools instance.
func (*DeployTools) Init ¶
func (d *DeployTools) Init(mcpServer *server.MCPServer)
Init registers the deployment tools on the MCP server.
type IntegrationTools ¶
type IntegrationTools struct {
// contains filtered or unexported fields
}
func NewIntegrationTools ¶
func NewIntegrationTools( integrationCmd *cobra.Command, cm *config.ConfigMapManager, im *integrations.Manager, ) *IntegrationTools
func (*IntegrationTools) Init ¶
func (i *IntegrationTools) Init(s *server.MCPServer)
Init registers the TSSC integration management tools with the MCP server. These tools allow users to list available integrations, scaffold their configurations, and check their current status.
type Interface ¶
type Interface interface {
// Init decorates the MCP server with the tool declaration.
Init(*server.MCPServer)
}
Interface represents the MCP tools in the project.
type NotesTool ¶ added in v1.8.0
type NotesTool struct {
// contains filtered or unexported fields
}
NotesTool a MCP tool to provide connection instructions for products. These products must be completely deployed before its "NOTES.txt" is generated.
func NewNotesTool ¶ added in v1.8.0
type StatusTool ¶ added in v1.8.0
type StatusTool struct {
// contains filtered or unexported fields
}
StatusTool represents the MCP tool that's responsible to report the current installer status in the cluster.
func NewStatusTool ¶ added in v1.8.0
func NewStatusTool( cm *config.ConfigMapManager, tb *resolver.TopologyBuilder, job *installer.Job, ) *StatusTool
NewStatusTool creates a new StatusTool instance.
func (*StatusTool) Init ¶ added in v1.8.0
func (s *StatusTool) Init(mcpServer *server.MCPServer)
Init registers the status tool.