endpoints

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

package: endpoints / transport type: interface + factory job: the Endpoint port — bind a transport to core.Handle — plus the factory limits: contract + dispatch; transports live in sub-packages (-> adapters/endpoints/rest_http, mcp_http)

Package endpoints defines the driving Endpoint port and builds it from config. An endpoint binds a transport (REST/HTTP, MCP/HTTP) to core: it receives client requests in its own wire format, builds a core.Request from them — extracting each auth credential its transport carries — hands it to core.Handle, and renders the enriched result back. Authentication and authorization happen inside core, keyed on the credentials the endpoint tagged; the endpoint stays pure transport. The server is event-driven — an endpoint serves requests as they arrive — so several endpoints may run at once on different ports or protocols.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoints

type Endpoints interface {
	// Serve runs the endpoint, handling requests until ctx is cancelled, then
	// shuts down.
	Serve(ctx context.Context) error

	// Close releases the endpoint's transport resources.
	Close() error
}

Endpoints is one configured transport listener carrying the full read-and- contribute surface into core. Backends: REST/HTTP (OpenAPI), MCP/HTTP (-> sub-packages).

func New

func New(ctx context.Context, cfg scope.Section, c *core.Core) (Endpoints, error)

New builds an endpoint of the transport named by the section's "type", wired to the core it drives. REST/HTTP is implemented; MCP/HTTP is pending.

Directories

Path Synopsis
package: mcp_http / transport type: adapter job: MCP/HTTP endpoint backend (agent tools) — implements the endpoints.Endpoints port limits: stub; implementation lands when the endpoint port is built (-> adapters/endpoints)
package: mcp_http / transport type: adapter job: MCP/HTTP endpoint backend (agent tools) — implements the endpoints.Endpoints port limits: stub; implementation lands when the endpoint port is built (-> adapters/endpoints)
package: rest_http / transport type: logic job: extract the request's auth credential from the wire and carry it to the handlers limits: extraction only; core resolves it and applies grants (-> internal/core)
package: rest_http / transport type: logic job: extract the request's auth credential from the wire and carry it to the handlers limits: extraction only; core resolves it and applies grants (-> internal/core)

Jump to

Keyboard shortcuts

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