transmeta

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2026 License: Apache-2.0 Imports: 15 Imported by: 195

Documentation

Overview

Package transmeta metadata handler for translation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetainfoClientHandler = new(metainfoClientHandler)
	MetainfoServerHandler = new(metainfoServerHandler)
)

singletons .

View Source
var (
	ClientTTHeaderHandler remote.MetaHandler = &clientTTHeaderHandler{}
	ServerTTHeaderHandler remote.MetaHandler = &serverTTHeaderHandler{}
)

TTHeader handlers.

View Source
var ClientHTTP2Handler = &clientHTTP2Handler{}

ClientHTTP2Handler default global client metadata handler

View Source
var ServerHTTP2Handler = &serverHTTP2Handler{}

ServerHTTP2Handler default global server metadata handler

Functions

func ParseBizStatusErr added in v0.12.0

func ParseBizStatusErr(strInfo map[string]string) (kerrors.BizStatusErrorIface, error)

func SetMetainfoPropagationMode deprecated added in v0.16.3

func SetMetainfoPropagationMode(mode MetainfoPropagationMode)

SetMetainfoPropagationMode sets the process default mode. It is primarily intended for tests and environments without a dynamic config center. When a context-aware provider is installed, the provider decides the effective mode; this process default is used only by the default provider/fallback path.

Deprecated: this is a temporary compatibility switch for the metainfo single-hop rollout and will be removed once single-hop becomes the default behavior.

func SetMetainfoPropagationModeProvider deprecated added in v0.16.3

func SetMetainfoPropagationModeProvider(provider func(context.Context) MetainfoPropagationMode)

SetMetainfoPropagationModeProvider installs a context-aware mode provider. Internal distributions can use it to bridge their config center into the open-source transmeta handler without adding config-center dependencies here. The provider takes precedence over the process default mode. Passing nil resets the provider to one that reads the current process default mode.

Deprecated: this is part of the temporary metainfo propagation rollout and will be removed once single-hop becomes the default behavior.

func TransferForwardMetaInfo deprecated added in v0.16.3

func TransferForwardMetaInfo(ctx context.Context) context.Context

TransferForwardMetaInfo advances inbound metainfo only under single_hop mode. Legacy mode intentionally keeps the historical context unchanged so the rollout switch remains reversible.

Deprecated: this is an internal rollout helper and will be removed once single-hop becomes the default behavior.

Types

type MetainfoPropagationMode deprecated added in v0.16.3

type MetainfoPropagationMode int32

MetainfoPropagationMode controls transient metainfo propagation semantics.

Deprecated: this is a temporary rollout switch for metainfo single-hop semantics and will be removed once single-hop becomes the default behavior.

const (
	// MetainfoPropagationLegacy keeps the historical behavior: stale/upstream
	// transient values are serialized again and may leak beyond one hop.
	//
	// Deprecated: this is part of the temporary metainfo propagation rollout and
	// will be removed once single-hop becomes the default behavior.
	MetainfoPropagationLegacy MetainfoPropagationMode = iota
	// MetainfoPropagationSingleHop only serializes current-hop transient values and
	// persistent values are serialized to downstream calls.
	//
	// Deprecated: this is part of the temporary metainfo propagation rollout and
	// will be removed once single-hop becomes the default behavior.
	MetainfoPropagationSingleHop
)

func GetMetainfoPropagationMode deprecated added in v0.16.3

func GetMetainfoPropagationMode() MetainfoPropagationMode

GetMetainfoPropagationMode returns the process default mode, which may differ from the effective mode when a context-aware provider is installed.

Deprecated: this is part of the temporary metainfo propagation rollout and will be removed once single-hop becomes the default behavior.

Jump to

Keyboard shortcuts

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