Help us shape the future of Go! Take the 2026 Go Developer Survey

remote

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package remote hosts a shared registry and relays tap's static MCP surface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(path, version, token, adminToken string) (http.Handler, func(), error)

Handler exposes authenticated MCP and write-only server administration.

func Serve

func Serve(ctx context.Context, path, version string, opts Options) error

Serve listens until cancellation, requiring TLS or explicit consent off loopback.

Types

type Client

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

Client shares one remote MCP session and reconnects after it closes.

func New

func New(cfg config.Remote, version string) (*Client, error)

New validates relay settings and requires a nonempty environment token.

func (*Client) Call

func (c *Client) Call(ctx context.Context, id string, args any, quiet bool) (wire.Object, error)

Call preserves all remote result fields, including _meta.

func (*Client) CallWithMeta

func (c *Client) CallWithMeta(ctx context.Context, id string, args any, quiet bool, meta mcp.Meta) (wire.Object, error)

CallWithMeta preserves request metadata across the stdio relay hop.

func (*Client) CallWithOptions

func (c *Client) CallWithOptions(ctx context.Context, id string, args any, quiet, retain bool, refs []registry.ArgumentReference, meta mcp.Meta) (wire.Object, error)

CallWithOptions forwards validated call controls and explicit references over one relay session.

func (*Client) Close

func (c *Client) Close()

Close shuts down the relay session and prevents reconnects.

func (*Client) Discover

func (c *Client) Discover(ctx context.Context, opt registry.SearchOptions, quiet bool) (wire.Object, error)

Discover forwards the complete discovery request without opening local connectors.

func (*Client) Drop

func (c *Client) Drop(ctx context.Context, id string) (wire.Object, error)

Drop releases a reference on this relay's remote MCP session.

func (*Client) Edit

func (c *Client) Edit(ctx context.Context, name string, definition wire.Object) (bool, error)

Edit performs remote administration; an optional admin environment token overrides the relay token.

func (*Client) Inspect

func (c *Client) Inspect(ctx context.Context, id, pointer string, offset, limit, maxBytes int) (wire.Object, error)

Inspect reads a reference created on this relay's remote MCP session.

func (*Client) Listing

func (c *Client) Listing(ctx context.Context, quiet bool) (wire.Object, error)

Listing returns the remote registry catalog without reading local servers.

func (*Client) Refresh

func (c *Client) Refresh(ctx context.Context, name string, quiet bool) (wire.Object, error)

Refresh performs a blocking live refresh on the host and returns its discovery catalog.

func (*Client) Search

func (c *Client) Search(ctx context.Context, query string, limit float64, quiet bool) (wire.Object, error)

Search searches the remote registry using tap's static tool.

type Options

type Options struct {
	Addr, TLSCert, TLSKey string
	AllowInsecure         bool
}

Options controls the listener; tokens always come from the environment.

Jump to

Keyboard shortcuts

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