Documentation
¶
Index ¶
- type HTTPPool
- func (p *HTTPPool) GetRunningCount() int
- func (p *HTTPPool) GetServer(name string) *HTTPServer
- func (p *HTTPPool) GetURL(name string) string
- func (p *HTTPPool) IsRunning(name string) bool
- func (p *HTTPPool) ListServers() []HTTPServerInfo
- func (p *HTTPPool) RegisterExternal(name, url string) error
- func (p *HTTPPool) Shutdown() error
- func (p *HTTPPool) Start(name, url, healthCheckURL, command string, args []string, ...) error
- func (p *HTTPPool) StartHealthMonitor()
- func (p *HTTPPool) Stop(name string) error
- func (p *HTTPPool) StopIfStartedByUs(name string) error
- type HTTPServer
- func (s *HTTPServer) GetLastError() error
- func (s *HTTPServer) GetName() string
- func (s *HTTPServer) GetStatus() ServerStatus
- func (s *HTTPServer) GetURL() string
- func (s *HTTPServer) HealthCheck() error
- func (s *HTTPServer) IsRunning() bool
- func (s *HTTPServer) Restart() error
- func (s *HTTPServer) SetStatus(status ServerStatus)
- func (s *HTTPServer) Start() error
- func (s *HTTPServer) StartedByUs() bool
- func (s *HTTPServer) Stop() error
- type HTTPServerInfo
- type JSONRPCRequest
- type JSONRPCResponse
- type Pool
- func (p *Pool) DiscoverExistingSockets() int
- func (p *Pool) FallbackEnabled() bool
- func (p *Pool) GetRunningCount() int
- func (p *Pool) GetSocketPath(name string) string
- func (p *Pool) GetURL(name string) string
- func (p *Pool) IsRunning(name string) bool
- func (p *Pool) ListServers() []ProxyInfo
- func (p *Pool) RegisterExternalSocket(name, socketPath string) error
- func (p *Pool) RestartProxy(name string) error
- func (p *Pool) RestartProxyWithRateLimit(name string) error
- func (p *Pool) ShouldPool(mcpName string) bool
- func (p *Pool) Shutdown() error
- func (p *Pool) Start(name, command string, args []string, env map[string]string) error
- func (p *Pool) StartHealthMonitor()
- type PoolConfig
- type ProxyInfo
- type ServerStatus
- type SocketProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPPool ¶ added in v0.8.96
type HTTPPool struct {
// contains filtered or unexported fields
}
HTTPPool manages a pool of HTTP MCP servers
func NewHTTPPool ¶ added in v0.8.96
NewHTTPPool creates a new HTTP server pool
func (*HTTPPool) GetRunningCount ¶ added in v0.8.96
GetRunningCount returns the number of running HTTP servers
func (*HTTPPool) GetServer ¶ added in v0.8.96
func (p *HTTPPool) GetServer(name string) *HTTPServer
GetServer returns the HTTP server by name
func (*HTTPPool) ListServers ¶ added in v0.8.96
func (p *HTTPPool) ListServers() []HTTPServerInfo
ListServers returns info about all HTTP servers
func (*HTTPPool) RegisterExternal ¶ added in v0.8.96
RegisterExternal registers an external HTTP server (already running)
func (*HTTPPool) Start ¶ added in v0.8.96
func (p *HTTPPool) Start(name, url, healthCheckURL, command string, args []string, env map[string]string, startupTimeout time.Duration) error
Start starts an HTTP server for the given MCP
func (*HTTPPool) StartHealthMonitor ¶ added in v0.8.96
func (p *HTTPPool) StartHealthMonitor()
StartHealthMonitor launches a background goroutine that checks for failed HTTP servers and restarts them automatically
func (*HTTPPool) StopIfStartedByUs ¶ added in v0.8.96
StopIfStartedByUs stops a server only if we started it (not external)
type HTTPServer ¶ added in v0.8.96
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer manages an HTTP MCP server process
func NewHTTPServer ¶ added in v0.8.96
func NewHTTPServer(ctx context.Context, name, url, healthCheckURL, command string, args []string, env map[string]string, startupTimeout time.Duration) *HTTPServer
NewHTTPServer creates a new HTTP server manager
func (*HTTPServer) GetLastError ¶ added in v0.8.96
func (s *HTTPServer) GetLastError() error
GetLastError returns the last error encountered
func (*HTTPServer) GetName ¶ added in v0.8.96
func (s *HTTPServer) GetName() string
GetName returns the server name
func (*HTTPServer) GetStatus ¶ added in v0.8.96
func (s *HTTPServer) GetStatus() ServerStatus
GetStatus safely reads the server status
func (*HTTPServer) GetURL ¶ added in v0.8.96
func (s *HTTPServer) GetURL() string
GetURL returns the HTTP endpoint URL
func (*HTTPServer) HealthCheck ¶ added in v0.8.96
func (s *HTTPServer) HealthCheck() error
HealthCheck checks if the server is responding
func (*HTTPServer) IsRunning ¶ added in v0.8.96
func (s *HTTPServer) IsRunning() bool
IsRunning returns true if the server is running
func (*HTTPServer) Restart ¶ added in v0.8.96
func (s *HTTPServer) Restart() error
Restart stops and restarts the server
func (*HTTPServer) SetStatus ¶ added in v0.8.96
func (s *HTTPServer) SetStatus(status ServerStatus)
SetStatus safely updates the server status
func (*HTTPServer) Start ¶ added in v0.8.96
func (s *HTTPServer) Start() error
Start starts the HTTP server process If the URL is already reachable, marks as external and skips process creation
func (*HTTPServer) StartedByUs ¶ added in v0.8.96
func (s *HTTPServer) StartedByUs() bool
StartedByUs returns true if we started this server (vs. external discovery)
func (*HTTPServer) Stop ¶ added in v0.8.96
func (s *HTTPServer) Stop() error
Stop stops the HTTP server process
type HTTPServerInfo ¶ added in v0.8.96
HTTPServerInfo provides info about an HTTP server
type JSONRPCRequest ¶
type JSONRPCResponse ¶
type JSONRPCResponse struct {
JSONRPC string `json:"jsonrpc"`
Result interface{} `json:"result,omitempty"`
Error interface{} `json:"error,omitempty"`
ID interface{} `json:"id,omitempty"`
}
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) DiscoverExistingSockets ¶ added in v0.8.1
DiscoverExistingSockets scans for existing pool sockets owned by another agent-deck instance and registers them so this instance can use them too. Returns count of discovered sockets.
func (*Pool) FallbackEnabled ¶ added in v0.8.1
FallbackEnabled returns whether stdio fallback is allowed when pool isn't working
func (*Pool) GetRunningCount ¶ added in v0.8.70
GetRunningCount returns the number of running MCP proxies
func (*Pool) GetSocketPath ¶
func (*Pool) ListServers ¶
func (*Pool) RegisterExternalSocket ¶ added in v0.8.1
RegisterExternalSocket registers an external socket owned by another agent-deck instance. This creates a proxy entry that points to the existing socket without starting a new process.
func (*Pool) RestartProxy ¶ added in v0.8.1
RestartProxy stops and restarts a proxy that has died
func (*Pool) RestartProxyWithRateLimit ¶ added in v0.8.5
RestartProxyWithRateLimit restarts a proxy with rate limiting to prevent loops
func (*Pool) ShouldPool ¶
func (*Pool) StartHealthMonitor ¶ added in v0.8.5
func (p *Pool) StartHealthMonitor()
StartHealthMonitor launches a background goroutine that checks for failed proxies every 3 seconds and restarts them automatically.
type PoolConfig ¶
type ServerStatus ¶
type ServerStatus int
ServerStatus represents MCP server state
const ( StatusStopped ServerStatus = iota StatusStarting StatusRunning StatusFailed StatusPermanentlyFailed )
func (ServerStatus) String ¶
func (s ServerStatus) String() string
type SocketProxy ¶
type SocketProxy struct {
Status ServerStatus
// contains filtered or unexported fields
}
SocketProxy wraps a stdio MCP process with a Unix socket
func NewSocketProxy ¶
func (*SocketProxy) GetClientCount ¶
func (p *SocketProxy) GetClientCount() int
func (*SocketProxy) GetSocketPath ¶
func (p *SocketProxy) GetSocketPath() string
func (*SocketProxy) GetStatus ¶ added in v0.8.5
func (p *SocketProxy) GetStatus() ServerStatus
GetStatus safely reads the proxy status
func (*SocketProxy) HealthCheck ¶
func (p *SocketProxy) HealthCheck() error
func (*SocketProxy) SetStatus ¶ added in v0.8.5
func (p *SocketProxy) SetStatus(s ServerStatus)
SetStatus safely updates the proxy status
func (*SocketProxy) Start ¶
func (p *SocketProxy) Start() error
func (*SocketProxy) Stop ¶
func (p *SocketProxy) Stop() error