Documentation
¶
Index ¶
- func NewOutboundHTTPClient(ctx context.Context, cfg OutboundHTTPConfig) (*http.Client, error)
- type Catalog
- type Client
- func (c *Client) CallTool(ctx context.Context, upstream *mcp.ServerSession, params *mcp.CallToolParams) (*mcp.CallToolResult, error)
- func (c *Client) Catalog() *Catalog
- func (c *Client) Close()
- func (c *Client) Complete(ctx context.Context, upstream *mcp.ServerSession, params *mcp.CompleteParams) (*mcp.CompleteResult, error)
- func (c *Client) Config() config.BackendConfig
- func (c *Client) ConnectOnce(ctx context.Context) error
- func (c *Client) GetPrompt(ctx context.Context, upstream *mcp.ServerSession, params *mcp.GetPromptParams) (*mcp.GetPromptResult, error)
- func (c *Client) ID() string
- func (c *Client) ReadResource(ctx context.Context, upstream *mcp.ServerSession, ...) (*mcp.ReadResourceResult, error)
- func (c *Client) Ready() bool
- func (c *Client) Required() bool
- func (c *Client) Run(ctx context.Context)
- func (c *Client) Subscribe(ctx context.Context, uri string) error
- func (c *Client) Unsubscribe(ctx context.Context, uri string) error
- type Manager
- func (m *Manager) AllowedIDs(scopes []string) []string
- func (m *Manager) AllowedProfile(scopes []string) ([]string, []string)
- func (m *Manager) Client(id string) (*Client, bool)
- func (m *Manager) Close()
- func (m *Manager) IDs() []string
- func (m *Manager) MissingScopes(id string, scopes []string) ([]string, bool)
- func (m *Manager) Ready() bool
- func (m *Manager) SeedUnavailableCatalogs(previous *Manager) []string
- func (m *Manager) Start(parent context.Context, requireReady bool) error
- func (m *Manager) Status() (ready, total, requiredReady, requiredTotal int)
- func (m *Manager) StatusDetails() map[string]StatusDetail
- type OutboundHTTPConfig
- type ProbeCounts
- type ProbeFeatures
- type ProbeResult
- type ProbeServer
- type StatusDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOutboundHTTPClient ¶ added in v1.2.0
NewOutboundHTTPClient builds the shared credentialed transport used by MCP backends and administrator-defined HTTP tools. The returned client owns tracked connections bound to ctx and never follows redirects.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CallTool ¶
func (c *Client) CallTool(ctx context.Context, upstream *mcp.ServerSession, params *mcp.CallToolParams) (*mcp.CallToolResult, error)
func (*Client) Complete ¶
func (c *Client) Complete(ctx context.Context, upstream *mcp.ServerSession, params *mcp.CompleteParams) (*mcp.CompleteResult, error)
func (*Client) Config ¶
func (c *Client) Config() config.BackendConfig
func (*Client) GetPrompt ¶
func (c *Client) GetPrompt(ctx context.Context, upstream *mcp.ServerSession, params *mcp.GetPromptParams) (*mcp.GetPromptResult, error)
func (*Client) ReadResource ¶
func (c *Client) ReadResource(ctx context.Context, upstream *mcp.ServerSession, params *mcp.ReadResourceParams) (*mcp.ReadResourceResult, error)
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) AllowedIDs ¶
func (*Manager) AllowedProfile ¶ added in v1.1.0
func (*Manager) MissingScopes ¶
func (*Manager) SeedUnavailableCatalogs ¶
SeedUnavailableCatalogs carries forward discovery data only for the same backend identity and endpoint. It never marks the new connection ready.
func (*Manager) StatusDetails ¶ added in v1.2.0
func (m *Manager) StatusDetails() map[string]StatusDetail
type OutboundHTTPConfig ¶ added in v1.2.0
type ProbeCounts ¶ added in v1.2.0
type ProbeFeatures ¶ added in v1.2.0
type ProbeResult ¶ added in v1.2.0
type ProbeResult struct {
LatencyMS int64 `json:"latency_ms"`
ProtocolVersion string `json:"protocol_version"`
Server ProbeServer `json:"server"`
Capabilities ProbeFeatures `json:"capabilities"`
Counts ProbeCounts `json:"counts"`
}
func Probe ¶ added in v1.2.0
func Probe(ctx context.Context, cfg config.BackendConfig, maximumRefresh time.Duration) (*ProbeResult, error)
type ProbeServer ¶ added in v1.2.0
Click to show internal directories.
Click to hide internal directories.