requesthost

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package requesthost threads the public-facing host of an inbound HTTP request from the transport layer into the service layer, mirroring the user_context package's pattern. Used by the MCP handler (a plain net/http handler, not grpc-gateway) so builtin tract tools can build absolute webhook_url values without the service layer depending on *http.Request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContext

func FromContext(ctx context.Context) (string, bool)

FromContext retrieves the public host stored by WithHost.

func WithHost

func WithHost(ctx context.Context, host string) context.Context

WithHost stores the request's public host (scheme-less, e.g. "artel.example.com") in ctx.

Types

This section is empty.

Jump to

Keyboard shortcuts

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