Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultIdentRefs = determinism.DefaultIdentRefs.Clone().SetAll(determinism.IdentRefs{ "go.temporal.io/sdk/internal.propagateCancel": false, "(*go.temporal.io/sdk/internal.cancelCtx).cancel": false, "(go.temporal.io/sdk/internal.SearchAttributes).Size": false, "go.temporal.io/sdk/internal.DeterministicKeys": false, "go.temporal.io/sdk/internal.DeterministicKeysFunc": false, })
DefaultIdentRefs are additional overrides of determinism.DefaultIdentRefs for safe Temporal library functions.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct { DebugfFunc func(string, ...interface{}) Debug bool IncludePosOnMessage bool Determinism *determinism.Checker SingleLine bool }
Checker checks if functions passed RegisterWorkflow are non-deterministic based on the results from the checker of the adjacent determinism package.
func NewChecker ¶
NewChecker creates a Checker for the given config.
func (*Checker) NewAnalyzer ¶
NewAnalyzer creates a Go analysis analyzer that can be used in existing tools. There is a -config flag for setting configuration, a -workflow-debug flag for enabling debug logs, a -determinism-debug flag for enabling determinism debug logs, and a -show-pos flag for showing position on nested errors. This analyzer does not have any results but does set the same facts as the determinism analyzer (*determinism.NonDeterminisms).
type Config ¶
type Config struct { // If empty, uses DefaultIdentRefs. IdentRefs determinism.IdentRefs // If nil, uses log.Printf. DebugfFunc func(string, ...interface{}) // Must be set to true to see advanced debug logs. Debug bool // Must be set to true to see advanced determinism debug logs. DeterminismDebug bool // If set, the file and line/col position is present on nested errors. IncludePosOnMessage bool // If set, the determinism checker will include facts per object EnableObjectFacts bool // If set, the output uses "->" instead of "\n" as the hierarchy separator. SingleLine bool }
Config is config for NewChecker.