headers

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 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"
)

Headers used by the internal RPC system.

Variables

This section is empty.

Functions

func AddCaller

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

AddCaller to an outgoing request.

func GetCaller

func GetCaller(header http.Header) (types.Option[*schema.VerbRef], 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.VerbRef, error)

GetCallers history from an incoming request.

func GetRequestName added in v0.12.0

func GetRequestName(header http.Header) (model.RequestName, bool, error)

GetRequestName 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.VerbRef)

func SetDirectRouted

func SetDirectRouted(header http.Header)

func SetRequestName added in v0.12.0

func SetRequestName(header http.Header, key model.RequestName)

Types

This section is empty.

Jump to

Keyboard shortcuts

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