Documentation
¶
Index ¶
- type APIAdapter
- func (a *APIAdapter) CallTool(ctx context.Context, toolName string, args map[string]interface{}) (*api.CallToolResult, error)
- func (a *APIAdapter) CallToolInternal(ctx context.Context, toolName string, args map[string]interface{}) (*mcp.CallToolResult, error)
- func (a *APIAdapter) GetAvailableTools() []string
- func (a *APIAdapter) GetEndpoint() string
- func (a *APIAdapter) GetPort() int
- func (a *APIAdapter) GetServiceData() map[string]interface{}
- func (a *APIAdapter) IsToolAvailable(toolName string) bool
- func (a *APIAdapter) Register()
- func (a *APIAdapter) RegisterServerPendingAuth(serverName, url, toolPrefix string, authInfo *api.AuthInfo) error
- func (a *APIAdapter) RegisterServerPendingAuthWithConfig(serverName, url, toolPrefix string, authInfo *api.AuthInfo, ...) error
- func (a *APIAdapter) UpdateCapabilities()
- type AggregatorService
- func (s *AggregatorService) GetEndpoint() string
- func (s *AggregatorService) GetManager() *aggregator.AggregatorManager
- func (s *AggregatorService) GetServiceData() map[string]interface{}
- func (s *AggregatorService) ManualRefresh(ctx context.Context) error
- func (s *AggregatorService) Restart(ctx context.Context) error
- func (s *AggregatorService) Start(ctx context.Context) error
- func (s *AggregatorService) Stop(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIAdapter ¶
type APIAdapter struct {
// contains filtered or unexported fields
}
APIAdapter adapts the AggregatorService to implement api.AggregatorHandler
func NewAPIAdapter ¶
func NewAPIAdapter(s *AggregatorService) *APIAdapter
NewAPIAdapter creates a new aggregator API adapter
func (*APIAdapter) CallTool ¶
func (a *APIAdapter) CallTool(ctx context.Context, toolName string, args map[string]interface{}) (*api.CallToolResult, error)
CallTool calls a tool and returns the result in API format
func (*APIAdapter) CallToolInternal ¶
func (a *APIAdapter) CallToolInternal(ctx context.Context, toolName string, args map[string]interface{}) (*mcp.CallToolResult, error)
CallToolInternal calls a tool and returns the raw MCP result
func (*APIAdapter) GetAvailableTools ¶
func (a *APIAdapter) GetAvailableTools() []string
GetAvailableTools returns all available tools
func (*APIAdapter) GetEndpoint ¶
func (a *APIAdapter) GetEndpoint() string
GetEndpoint returns the aggregator's SSE endpoint URL
func (*APIAdapter) GetServiceData ¶
func (a *APIAdapter) GetServiceData() map[string]interface{}
GetServiceData returns aggregator service data
func (*APIAdapter) IsToolAvailable ¶
func (a *APIAdapter) IsToolAvailable(toolName string) bool
IsToolAvailable checks if a tool is available
func (*APIAdapter) Register ¶
func (a *APIAdapter) Register()
Register registers this adapter with the API package
func (*APIAdapter) RegisterServerPendingAuth ¶
func (a *APIAdapter) RegisterServerPendingAuth(serverName, url, toolPrefix string, authInfo *api.AuthInfo) error
RegisterServerPendingAuth registers a server that requires OAuth authentication
func (*APIAdapter) RegisterServerPendingAuthWithConfig ¶
func (a *APIAdapter) RegisterServerPendingAuthWithConfig(serverName, url, toolPrefix string, authInfo *api.AuthInfo, authConfig *api.MCPServerAuth) error
RegisterServerPendingAuthWithConfig registers a server that requires OAuth authentication with additional auth configuration for SSO token forwarding.
func (*APIAdapter) UpdateCapabilities ¶
func (a *APIAdapter) UpdateCapabilities()
UpdateCapabilities updates the aggregator's capabilities
type AggregatorService ¶
type AggregatorService struct {
*services.BaseService
// contains filtered or unexported fields
}
AggregatorService implements the Service interface for the MCP aggregator This is a thin wrapper around AggregatorManager that handles only lifecycle management
func NewAggregatorService ¶
func NewAggregatorService( config aggregator.AggregatorConfig, orchestratorAPI api.OrchestratorAPI, serviceRegistry api.ServiceRegistryHandler, ) *AggregatorService
NewAggregatorService creates a new aggregator service
func (*AggregatorService) GetEndpoint ¶
func (s *AggregatorService) GetEndpoint() string
GetEndpoint returns the aggregator's SSE endpoint URL
func (*AggregatorService) GetManager ¶
func (s *AggregatorService) GetManager() *aggregator.AggregatorManager
GetManager returns the underlying aggregator manager for advanced operations
func (*AggregatorService) GetServiceData ¶
func (s *AggregatorService) GetServiceData() map[string]interface{}
GetServiceData implements ServiceDataProvider
func (*AggregatorService) ManualRefresh ¶
func (s *AggregatorService) ManualRefresh(ctx context.Context) error
ManualRefresh manually triggers a refresh of healthy MCP server registrations This can be useful for debugging or forced updates
func (*AggregatorService) Restart ¶
func (s *AggregatorService) Restart(ctx context.Context) error
Restart restarts the aggregator service