Documentation ¶
Index ¶
- Constants
- Variables
- func GetValues(ctx context.Context, headerNames ...string) []string
- func NewDefaultVersionChecker() *versionChecker
- func NewVersionChecker(supportedClients map[string]string, serverVersion string) *versionChecker
- func Propagate(ctx context.Context) context.Context
- func SetCLIVersions(ctx context.Context) context.Context
- func SetVersions(ctx context.Context) context.Context
- func SetVersionsForTests(ctx context.Context, ...) context.Context
- type VersionChecker
Constants ¶
View Source
const ( ClientNameHeaderName = "client-name" ClientVersionHeaderName = "client-version" SupportedServerVersionsHeaderName = "supported-server-versions" SupportedFeaturesHeaderName = "supported-features" SupportedFeaturesHeaderDelim = "," )
View Source
const ( ClientNameServer = "temporal-server" ClientNameGoSDK = "temporal-go" ClientNameJavaSDK = "temporal-java" ClientNamePHPSDK = "temporal-php" ClientNameTypeScriptSDK = "temporal-typescript" ClientNameCLI = "temporal-cli" ServerVersion = "1.14.3" CLIVersion = "1.14.3" // SupportedServerVersions is used by CLI and inter role communication. SupportedServerVersions = ">=1.0.0 <2.0.0" // FeatureFollowsNextRunID means that the client supports following next execution run id for // completed/failed/timedout completion events when getting the final result of a workflow. FeatureFollowsNextRunID = "follows-next-run-id" )
Variables ¶
View Source
var ( // AllFeatures contains all known features. This list is used as the value of the supported // features header for internal server requests. There is an assumption that if a feature is // defined, then the server itself supports it. AllFeatures = strings.Join([]string{ FeatureFollowsNextRunID, }, SupportedFeaturesHeaderDelim) SupportedClients = map[string]string{ ClientNameGoSDK: "<2.0.0", ClientNameJavaSDK: "<2.0.0", ClientNamePHPSDK: "<2.0.0", ClientNameTypeScriptSDK: "<2.0.0", ClientNameCLI: "<2.0.0", ClientNameServer: "<2.0.0", } )
Functions ¶
func GetValues ¶
GetValues returns header values for passed header names. It always returns slice of the same size as number of passed header names.
func NewDefaultVersionChecker ¶ added in v1.0.0
func NewDefaultVersionChecker() *versionChecker
NewDefaultVersionChecker constructs a new VersionChecker using default versions from const.
func NewVersionChecker ¶
NewVersionChecker constructs a new VersionChecker
func Propagate ¶ added in v1.13.0
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 ¶
SetCLIVersions sets headers for CLI requests.
func SetVersions ¶
SetVersions sets headers for internal communications.
Types ¶
Click to show internal directories.
Click to hide internal directories.