Documentation
¶
Index ¶
Constants ¶
View Source
const ( ErrCodeMethodNotFound = -32601 ErrCodeInvalidParams = -32602 ErrCodeInternalError = -32603 )
Variables ¶
View Source
var ( ErrToolNotFound = errors.New("tool not found in any registered server") ErrAmbiguousTool = errors.New("tool found in multiple servers") ErrServerOffline = errors.New("target server is offline") ErrRoutingFailed = errors.New("routing failed") ErrInvalidMethod = errors.New("invalid method name") )
Functions ¶
This section is empty.
Types ¶
type RouteResult ¶
type RouteResult struct {
Method string
ServerID string
Server *ServerEntry
Error error
}
type Router ¶
type RouterError ¶
func NewRouterError ¶
func NewRouterError(code int, message string, err error) *RouterError
func (*RouterError) Error ¶
func (e *RouterError) Error() string
func (*RouterError) Unwrap ¶
func (e *RouterError) Unwrap() error
type ServerEntry ¶
type ServerEntry = registry.ServerEntry
type ToolRegistry ¶
type ToolRegistry interface {
RegisterTool(ctx context.Context, tool ToolEntry) error
UnregisterTool(ctx context.Context, name string) error
FindByNamespace(ctx context.Context, namespace string) ([]string, error)
FindByToolName(ctx context.Context, toolName string) ([]string, error)
FindServerForTool(ctx context.Context, toolName string) (string, error)
ListTools(ctx context.Context) ([]ToolEntry, error)
}
func NewToolRegistry ¶
func NewToolRegistry() ToolRegistry
Click to show internal directories.
Click to hide internal directories.