remote

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: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package remote contains an ordinary remote component handler. The handler receives bound configuration and providers through the same DI path as an application-defined handler. Shared remote call planning lives in runtime/remote.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler[O any] struct {
	Mapper *core.Mapper    `bind:"kind=remote_mapper,required"`
	HTTP   xhttp.Provider  `bind:"kind=http_client"`
	MCP    xmcp.Provider   `bind:"kind=mcp_client"`
	Cache  xcache.Provider `bind:"kind=cache"`
}

Handler is an ordinary component handler over Input and a user-declared output. Native Bindly resolves its static dependencies once, during runtime registration, before Exec can run. Register it like any other contract:

custom.New(&remote.Handler[access.Context]{})

func (*Handler[O]) Exec

func (h *Handler[O]) Exec(ctx context.Context, _ xhandler.Session, input *Input, output *O) error

Exec selects one transport explicitly from the bound configuration.

type Input

type Input struct {
	Token  string      `parameter:"Token,kind=header,in=Authorization,required"`
	Remote core.Config `parameter:"Remote,kind=const,in=Remote"`
}

Input is the shipped per-request input: one caller credential forwarded verbatim by a request mapping and the typed configuration constant. Component metadata may rename the incoming header; nothing here inspects or rewrites the credential. Applications with other request shapes declare their own input and call Mapper.HTTP or Mapper.MCP from Exec.

Jump to

Keyboard shortcuts

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