Documentation
¶
Overview ¶
Package meta defines the internal contract for what the gateway learns about a request once and every later stage reads: the Target on the context, and the namespace stamped on outgoing metadata for the per-upstream proxy. It depends on no other internal packages.
Index ¶
Constants ¶
const NamespaceHeader = "x-temporal-proxy-namespace"
NamespaceHeader is the outgoing metadata key that carries the local (pre- translation) namespace from the router to the upstream proxy.
Variables ¶
This section is empty.
Functions ¶
func NamespaceFrom ¶
NamespaceFrom returns the namespace carried on ctx's outgoing metadata, or "" when absent. When multiple values are present the last (most recently added) wins.
func WithNamespace ¶
WithNamespace returns ctx with namespace set on its outgoing gRPC metadata, replacing any value already present for NamespaceHeader (so a client cannot influence routing by sending the header itself).
func WithTarget ¶ added in v0.5.0
WithTarget returns ctx carrying target. It travels as a context value rather than as metadata because a caller must not be able to forge it: the gateway derives a Target from the stream it accepted, and authentication decides on it.
Types ¶
type Target ¶ added in v0.5.0
Target is what a request is addressing: the gRPC full method and the Temporal namespace named in its first message. Namespace is "" when the request names none, when its payload could not be read, or when the gateway does not forward the method's service and so never read one.
func TargetFrom ¶ added in v0.5.0
TargetFrom returns the Target carried on ctx, or the zero Target when absent. A zero Target is the honest answer for a request the gateway has not inspected, so callers weighing one must treat empty fields as "unknown" rather than as values to match on.