headers

package
v0.381.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 or fsm call that initiated this call.
	ParentRequestIDHeader = "Ftl-Parent-Request-Id"
)

Headers used by the internal RPC system.

Variables

This section is empty.

Functions

func AddCaller

func AddCaller(header http.Header, ref *schema.Ref)

AddCaller to an outgoing request.

func GetCaller

func GetCaller(header http.Header) (optional.Option[*schema.Ref], error)

GetCaller returns the module.verb of the caller, if any.

Will return an error if the header is malformed.

func GetCallers

func GetCallers(header http.Header) ([]*schema.Ref, error)

GetCallers history from an incoming request.

func GetParentRequestKey added in v0.326.0

func GetParentRequestKey(header http.Header) (model.RequestKey, bool, error)

func GetRequestKey added in v0.167.0

func GetRequestKey(header http.Header) (model.RequestKey, bool, error)

GetRequestKey from an incoming request.

Will return ("", false, nil) if no request key is present.

func IsDirectRouted

func IsDirectRouted(header http.Header) bool

func SetCallers

func SetCallers(header http.Header, refs []*schema.Ref)

func SetDirectRouted

func SetDirectRouted(header http.Header)

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.

Jump to

Keyboard shortcuts

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