headers

package
v1.18.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientNameHeaderName              = "client-name"
	ClientVersionHeaderName           = "client-version"
	SupportedServerVersionsHeaderName = "supported-server-versions"
	SupportedFeaturesHeaderName       = "supported-features"
	SupportedFeaturesHeaderDelim      = ","
)
View Source
const (
	ClientNameCLI = "temporal-cli"

	CLIVersion = "1.18.0"

	// SupportedServerVersions is used by CLI and inter role communication.
	SupportedServerVersions = ">=1.0.0 <2.0.0"
)

Variables

This section is empty.

Functions

func GetValues

func GetValues(ctx context.Context, headerNames ...string) []string

GetValues returns header values for passed header names. It always returns slice of the same size as number of passed header names.

func Propagate

func Propagate(ctx context.Context) context.Context

Propagate propagates version headers from incoming context to outgoing context. It copies all version headers to outgoing context only if they are exist in incoming context and doesn't exist in outgoing context already.

func SetCLIVersions

func SetCLIVersions(ctx context.Context) context.Context

SetCLIVersions sets headers for CLI requests.

func SetVersions

func SetVersions(ctx context.Context) context.Context

SetVersions sets headers for internal communications.

func SetVersionsForTests

func SetVersionsForTests(ctx context.Context, clientVersion, clientName, supportedServerVersions, supportedFeatures string) context.Context

SetVersionsForTests sets headers as they would be received from the client. Must be used in tests only.

Types

This section is empty.

Jump to

Keyboard shortcuts

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