Documentation
¶
Overview ¶
Package server wires dependencies and builds the HTTP handler container.
Index ¶
- func CreateMCPTool(t m.MCPTool) mcp.Tool
- func ReadJSON[T any](w http.ResponseWriter, r *http.Request, dst *T) bool
- func WriteJSON(w http.ResponseWriter, code int, v any)
- type Config
- type Deps
- type Option
- func WithAppConfig(c *cfgpkg.Config) Option
- func WithCatalog(s *catalog.Service) Option
- func WithCatalogOrchestrator(o *catalogOrchestrator.Orchestrator) Option
- func WithEncrypter(e *encryptor.AESEncrypter) Option
- func WithHubs(s *mcphub.Service) Option
- func WithLogger(l *slog.Logger) Option
- func WithMcphubOrchestrator(o *mcphubOrchestrator.Orchestrator) Option
- func WithTools(s *tool.Service) Option
- func WithUserService(s *usersvc.Service) Option
- func WithVirtual(s *virtualmcp.Service) Option
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMCPTool ¶
CreateMCPTool constructs an mcp-go Tool from a DB tool record.
Types ¶
type Config ¶
type Config struct {
Middlewares []func(http.Handler) http.Handler
MCPMount string
AdminPrefix string
}
Config holds HTTP wiring configuration.
type Deps ¶
type Deps struct {
Logger *slog.Logger
Tools *tool.Service
Hubs *mcphub.Service
Virtual *virtualmcp.Service
Catalog *catalog.Service
Encrypter *encryptor.AESEncrypter
UserService *usersvc.Service
McphubOrchestrator *mcphubOrchestrator.Orchestrator
CatalogOrchestrator *catalogOrchestrator.Orchestrator
AppConfig *cfgpkg.Config
}
Deps enumerates dependencies required to assemble the server.
type Option ¶
type Option func(*Deps)
Option configures dependencies for the server.
func WithCatalogOrchestrator ¶
func WithCatalogOrchestrator(o *catalogOrchestrator.Orchestrator) Option
WithCatalogOrchestrator ...
func WithMcphubOrchestrator ¶
func WithMcphubOrchestrator(o *mcphubOrchestrator.Orchestrator) Option
WithMcphubOrchestrator ...
Click to show internal directories.
Click to hide internal directories.