Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StaticConfig ¶
type StaticConfig struct {
// Server configuration
Port int `mapstructure:"port"`
SSEBaseURL string `mapstructure:"sse_base_url"`
// Logging configuration
LogLevel int `mapstructure:"log_level"`
// Rancher configuration
RancherServerURL string `mapstructure:"rancher_server_url"`
RancherToken string `mapstructure:"rancher_token"`
RancherAccessKey string `mapstructure:"rancher_access_key"`
RancherSecretKey string `mapstructure:"rancher_secret_key"`
RancherTLSInsecure bool `mapstructure:"rancher_tls_insecure"`
// Security configuration
ReadOnly bool `mapstructure:"read_only"`
DisableDestructive bool `mapstructure:"disable_destructive"`
// Output configuration
ListOutput string `mapstructure:"list_output"`
OutputFilters []string `mapstructure:"output_filters"`
// Toolset configuration
Toolsets []string `mapstructure:"toolsets"`
EnabledTools []string `mapstructure:"enabled_tools"`
DisabledTools []string `mapstructure:"disabled_tools"`
}
StaticConfig represents the static configuration for the Rancher MCP Server
func LoadConfig ¶
func LoadConfig(configPath string) (*StaticConfig, error)
LoadConfig loads configuration from file and environment variables using Viper Priority: command-line flags > environment variables > config file > defaults
func (*StaticConfig) GetPortString ¶
func (c *StaticConfig) GetPortString() string
GetPortString returns the port as a string in the format ":port"
func (*StaticConfig) HasRancherConfig ¶
func (c *StaticConfig) HasRancherConfig() bool
HasRancherConfig returns true if Rancher configuration is present
func (*StaticConfig) Validate ¶
func (c *StaticConfig) Validate() error
Validate validates the configuration
Click to show internal directories.
Click to hide internal directories.