Documentation
¶
Overview ¶
Package clients is the composition-root wiring for outbound client capabilities. It adapts the public xdatly HTTP and MCP provider contracts to native Bindly input binding and owns the lifecycle of Datly's default implementations. Handlers declare
HTTP xhttp.Provider `bind:"kind=http_client,required"` MCP xmcp.Provider `bind:"kind=mcp_client,required"`
and receive whichever provider the runtime composition registered. Nothing here inspects request values; a provider is either registered or the binding fails.
Index ¶
Constants ¶
const ( // HTTPKind is the Bindly source kind that resolves xhttp.Provider. HTTPKind = "http_client" // MCPKind is the Bindly source kind that resolves xmcp.Provider. MCPKind = "mcp_client" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry owns Datly's default HTTP and MCP client implementations. The composition root that creates it must Close it at shutdown; handlers only borrow the providers it exposes.
func (*Registry) Clients ¶
Clients reports the number of distinct configured clients currently held.
func (*Registry) Close ¶
Close releases every client the registry created and refuses further resolution.