config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package config provides configuration structures for the MCP component.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigParams

type ConfigParams struct {
	fx.In

	Logger log.Logger
}

ConfigParams contains the parameters needed for configuration

type ConfigResult

type ConfigResult struct {
	fx.Out

	Config ServerConfig
}

ConfigResult contains the configuration output

func NewConfig

func NewConfig(p ConfigParams) (ConfigResult, error)

NewConfig creates a new MCP configuration

type RemoteMCPServer

type RemoteMCPServer struct {
	URL         string `json:"url"`
	Name        string `json:"name"`
	Description string `json:"description"`
	ID          int64  `json:"-"` // ID field, excluded from JSON config
}

RemoteMCPServer defines a remote MCP server to connect to

type ServerConfig

type ServerConfig struct {
	Port                 int           `json:"port" default:"8087"`
	HeartbeatInterval    time.Duration `json:"heartbeat_interval" default:"15s"`
	HealthCheckInterval  time.Duration `json:"health_check_interval" default:"30s"`
	ConnectionTimeout    time.Duration `json:"connection_timeout" default:"5s"`
	MaxReconnectAttempts int           `json:"max_reconnect_attempts" default:"10"`
}

ServerConfig holds the configuration for the MCP server

Jump to

Keyboard shortcuts

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