client

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package client owns the default outbound client implementations. Registry resolves one client per distinct typed options value, reuses it across invocations and components, and releases everything on Close. It is the single lifecycle boundary; borrowers never close clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry caches HTTP and MCP clients keyed by option identity.

func NewRegistry

func NewRegistry() *Registry

NewRegistry builds an empty registry.

func (*Registry) Close

func (r *Registry) Close() error

Close releases every client (MCP sessions included) and refuses further resolution.

func (*Registry) HTTP

func (r *Registry) HTTP() xhttp.Provider

HTTP exposes the registry as the public HTTP provider contract.

func (*Registry) MCP

func (r *Registry) MCP() xmcp.Provider

MCP exposes the registry as the public MCP provider contract.

func (*Registry) Size

func (r *Registry) Size() int

Size reports the number of distinct configured clients held.

Directories

Path Synopsis
Package http is Datly's default implementation of the public outbound HTTP client contract (github.com/viant/xdatly/client/http).
Package http is Datly's default implementation of the public outbound HTTP client contract (github.com/viant/xdatly/client/http).
Package mcp is Datly's default implementation of the public outbound MCP client contract (github.com/viant/xdatly/client/mcp) built on github.com/viant/mcp.
Package mcp is Datly's default implementation of the public outbound MCP client contract (github.com/viant/xdatly/client/mcp) built on github.com/viant/mcp.
Package support holds helpers shared by the default HTTP and MCP client implementations: option identity, header canonicalization, endpoint validation, limit resolution and the hardened transport factory.
Package support holds helpers shared by the default HTTP and MCP client implementations: option identity, header canonicalization, endpoint validation, limit resolution and the hardened transport factory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL