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 ¶
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 ¶
func GetRequestKey ¶
GetRequestKey from an incoming request.
Will return ("", false, nil) if no request key is present.
func IsDirectRouted ¶
func SetDirectRouted ¶
func SetParentRequestKey ¶
func SetParentRequestKey(header http.Header, key model.RequestKey)
func SetRequestKey ¶
func SetRequestKey(header http.Header, key model.RequestKey)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.