Documentation ¶
Index ¶
- Constants
- func AddCaller(header http.Header, ref *schema.Ref)
- func CopyRequestForForwarding[T any](req *connect.Request[T]) *connect.Request[T]
- func GetCaller(header http.Header) (optional.Option[*schema.Ref], error)
- func GetCallers(header http.Header) ([]*schema.Ref, error)
- func GetParentRequestKey(header http.Header) (model.RequestKey, bool, error)
- func GetRequestKey(header http.Header) (model.RequestKey, bool, error)
- func IsDirectRouted(header http.Header) bool
- func SetCallers(header http.Header, refs []*schema.Ref)
- func SetDirectRouted(header http.Header)
- func SetParentRequestKey(header http.Header, key model.RequestKey)
- func SetRequestKey(header http.Header, key model.RequestKey)
Constants ¶
View Source
const ( DirectRoutingHeader = "Ftl-Direct" // VerbHeader is the header used to pass the module.verb of the current request. // // One header will be present for each hop in the request path. VerbHeader = "Ftl-Verb" // RequestIDHeader is the header used to pass the inbound request ID. RequestIDHeader = "Ftl-Request-Id" // ParentRequestIDHeader is the header used to pass the parent request ID, // i.e. the publisher that initiated this call. ParentRequestIDHeader = "Ftl-Parent-Request-Id" )
Headers used by the internal RPC system.
Variables ¶
This section is empty.
Functions ¶
func CopyRequestForForwarding ¶ added in v0.397.1
CopyRequestForForwarding creates a new request with the same message as the original, but with only the FTL specific headers
func GetCaller ¶
GetCaller returns the module.verb of the caller, if any.
Will return an error if the header is malformed.
func GetCallers ¶
GetCallers history from an incoming request.
func GetParentRequestKey ¶ added in v0.326.0
func GetRequestKey ¶ added in v0.167.0
GetRequestKey from an incoming request.
Will return ("", false, nil) if no request key is present.
func IsDirectRouted ¶
func SetDirectRouted ¶
func SetParentRequestKey ¶ added in v0.326.0
func SetParentRequestKey(header http.Header, key model.RequestKey)
func SetRequestKey ¶ added in v0.167.0
func SetRequestKey(header http.Header, key model.RequestKey)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.