Documentation
¶
Overview ¶
Package transmeta metadata handler for translation
Index ¶
- Variables
- func ParseBizStatusErr(strInfo map[string]string) (kerrors.BizStatusErrorIface, error)
- func SetMetainfoPropagationMode(mode MetainfoPropagationMode)deprecated
- func SetMetainfoPropagationModeProvider(provider func(context.Context) MetainfoPropagationMode)deprecated
- func TransferForwardMetaInfo(ctx context.Context) context.Contextdeprecated
- type MetainfoPropagationModedeprecated
Constants ¶
This section is empty.
Variables ¶
var ( MetainfoClientHandler = new(metainfoClientHandler) MetainfoServerHandler = new(metainfoServerHandler) )
singletons .
var ( ClientTTHeaderHandler remote.MetaHandler = &clientTTHeaderHandler{} ServerTTHeaderHandler remote.MetaHandler = &serverTTHeaderHandler{} )
TTHeader handlers.
var ClientHTTP2Handler = &clientHTTP2Handler{}
ClientHTTP2Handler default global client metadata handler
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
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.