Skip to content

Commit

Permalink
feat(metainfo): define standard for backward prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWhiteWu committed Oct 14, 2021
1 parent 5e400b9 commit 96c48ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cloud/metainfo/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ import (
const (
HTTPPrefixTransient = "rpc-transit-"
HTTPPrefixPersistent = "rpc-persist-"
HTTPPrefixBackward = "rpc-backward-"

lenHPT = len(HTTPPrefixTransient)
lenHPP = len(HTTPPrefixPersistent)
lenHPB = len(HTTPPrefixBackward)
)

// HTTPHeaderToCGIVariable performs an CGI variable conversion.
Expand Down
4 changes: 4 additions & 0 deletions cloud/metainfo/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,14 @@ const (
PrefixPersistent = "RPC_PERSIST_"
PrefixTransient = "RPC_TRANSIT_"
PrefixTransientUpstream = "RPC_TRANSIT_UPSTREAM_"
PrefixBackward = "RPC_BACKWARD_"
PrefixBackwardUpstream = "RPC_BACKWARD_UPSTREAM_"

lenPTU = len(PrefixTransientUpstream)
lenPT = len(PrefixTransient)
lenPP = len(PrefixPersistent)
lenB = len(PrefixBackward)
lenBU = len(PrefixBackwardUpstream)
)

// **Using empty string as key or value is not support.**
Expand Down

0 comments on commit 96c48ba

Please sign in to comment.