config

package
v0.0.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsToolSupported

func IsToolSupported(tool string) bool

IsToolSupported checks if a tool is supported

Types

type ConfigData

type ConfigData struct {
	// Map of additional tools enabled
	AdditionalTools map[string]bool
	// Command execution timeout in seconds
	Timeout int
	// Security configuration
	SecurityConfig *security.SecurityConfig

	// Command-line specific options
	Transport       string
	Host            string
	Port            int
	AccessLevel     string
	AllowNamespaces string

	// OTLP endpoint for OpenTelemetry traces
	OTLPEndpoint string

	// Telemetry service
	TelemetryService telemetry.TelemetryInterface

	// UseLegacyTools controls whether to use multiple specialized tools (true) or unified call_kubectl tool (false, default)
	UseLegacyTools bool
}

ConfigData holds the global configuration

func NewConfig

func NewConfig() *ConfigData

NewConfig creates and returns a new configuration instance

func (*ConfigData) InitializeTelemetry added in v0.0.8

func (cfg *ConfigData) InitializeTelemetry(ctx context.Context, serviceName, serviceVersion string)

InitializeTelemetry initializes the telemetry service

func (*ConfigData) ParseFlags

func (cfg *ConfigData) ParseFlags() error

ParseFlags parses command line arguments and updates the configuration

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator handles all validation logic for MCP Kubernetes

func NewValidator

func NewValidator(cfg *ConfigData) *Validator

NewValidator creates a new validator instance

func (*Validator) GetErrors

func (v *Validator) GetErrors() []string

GetErrors returns all errors found during validation

func (*Validator) PrintErrors

func (v *Validator) PrintErrors()

PrintErrors prints all validation errors to stdout

func (*Validator) Validate

func (v *Validator) Validate() bool

Validate runs all validation checks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL