From b93c876dd60fbeb5ae862cea9f31b047e82e6b50 Mon Sep 17 00:00:00 2001 From: Andrew Yuan Date: Thu, 5 Mar 2026 14:39:40 -0500 Subject: [PATCH] doc improvements --- client/client.go | 4 ++-- temporal/default_failure_converter.go | 2 +- temporal/search_attributes.go | 2 +- temporalnexus/operation.go | 4 ++-- testsuite/devserver.go | 6 +++--- workflow/context.go | 2 +- workflow/workflow.go | 22 +++++++++++----------- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/client/client.go b/client/client.go index a04461139..a2f59ddfe 100644 --- a/client/client.go +++ b/client/client.go @@ -464,7 +464,7 @@ type ( // NOTE: Experimental WorkerDeploymentHandle = internal.WorkerDeploymentHandle - // DeploymentListOptions are the parameters for configuring listing Worker Deployments. + // WorkerDeploymentListOptions are the parameters for configuring listing Worker Deployments. // // NOTE: Experimental WorkerDeploymentListOptions = internal.WorkerDeploymentListOptions @@ -781,7 +781,7 @@ type ( // WARNING: Worker versioning is currently experimental. VersioningAssignmentRuleWithTimestamp = internal.VersioningAssignmentRuleWithTimestamp //lint:ignore SA1019 transitioning to Worker Deployments - // VersioningAssignmentRule is a BuildID redirect rule for a task queue. + // VersioningRedirectRule is a BuildID redirect rule for a task queue. // It changes the behavior of currently running workflows and new ones. // // Deprecated: Build-id based versioning is deprecated in favor of worker deployment based versioning and will be removed soon. diff --git a/temporal/default_failure_converter.go b/temporal/default_failure_converter.go index cf8d22a0b..56262b7b4 100644 --- a/temporal/default_failure_converter.go +++ b/temporal/default_failure_converter.go @@ -18,7 +18,7 @@ func NewDefaultFailureConverter(opt DefaultFailureConverterOptions) *DefaultFail return internal.NewDefaultFailureConverter(opt) } -// GetDefaultDataConverter returns the default failure converter used by Temporal. +// GetDefaultFailureConverter returns the default failure converter used by Temporal. func GetDefaultFailureConverter() converter.FailureConverter { return internal.GetDefaultFailureConverter() } diff --git a/temporal/search_attributes.go b/temporal/search_attributes.go index 638a2da44..163ad41b3 100644 --- a/temporal/search_attributes.go +++ b/temporal/search_attributes.go @@ -6,7 +6,7 @@ type ( // SearchAttributes represents a collection of typed search attributes. Create with [NewSearchAttributes]. SearchAttributes = internal.SearchAttributes - // SearchAttributesUpdate represents a change to SearchAttributes. + // SearchAttributeUpdate represents a change to SearchAttributes. SearchAttributeUpdate = internal.SearchAttributeUpdate // SearchAttributeKey represents a typed search attribute key. diff --git a/temporalnexus/operation.go b/temporalnexus/operation.go index c092e8b8c..9d06e3d65 100644 --- a/temporalnexus/operation.go +++ b/temporalnexus/operation.go @@ -108,7 +108,7 @@ func NewWorkflowRunOperation[I, O any]( } } -// NewWorkflowRunOperation map an operation to a workflow run with the given options. +// NewWorkflowRunOperationWithOptions maps an operation to a workflow run with the given options. // Returns an error if invalid options are provided. func NewWorkflowRunOperationWithOptions[I, O any](options WorkflowRunOperationOptions[I, O]) (nexus.Operation[I, O], error) { if options.Name == "" { @@ -131,7 +131,7 @@ func NewWorkflowRunOperationWithOptions[I, O any](options WorkflowRunOperationOp }, nil } -// MustNewWorkflowRunOperation map an operation to a workflow run with the given options. +// MustNewWorkflowRunOperationWithOptions maps an operation to a workflow run with the given options. // Panics if invalid options are provided. func MustNewWorkflowRunOperationWithOptions[I, O any](options WorkflowRunOperationOptions[I, O]) nexus.Operation[I, O] { op, err := NewWorkflowRunOperationWithOptions(options) diff --git a/testsuite/devserver.go b/testsuite/devserver.go index d3d5a9a82..41ebf8fd8 100644 --- a/testsuite/devserver.go +++ b/testsuite/devserver.go @@ -26,7 +26,7 @@ import ( "go.temporal.io/sdk/temporal" ) -// Cached download of the dev server. +// CachedDownload is the cached download configuration for the dev server binary. type CachedDownload struct { // Which version to download, by default the latest version compatible with the SDK will be downloaded. // Acceptable values are specific release versions (e.g v0.3.0), "default", and "latest". @@ -35,7 +35,7 @@ type CachedDownload struct { DestDir string } -// Configuration for the dev server. +// DevServerOptions configures the dev server process. type DevServerOptions struct { // Existing path on the filesystem for the executable. ExistingPath string @@ -66,7 +66,7 @@ type DevServerOptions struct { Stderr io.Writer } -// Temporal CLI based DevServer +// DevServer is a Temporal CLI-based dev server process. type DevServer struct { cmd *exec.Cmd client client.Client diff --git a/workflow/context.go b/workflow/context.go index 53fff923c..0de581a93 100644 --- a/workflow/context.go +++ b/workflow/context.go @@ -28,7 +28,7 @@ var ErrCanceled = internal.ErrCanceled // deadline passes. var ErrDeadlineExceeded = internal.ErrDeadlineExceeded -// A CancelFunc tells an operation to abandon its work. +// CancelFunc tells an operation to abandon its work. // A CancelFunc does not wait for the work to stop. // After the first call, subsequent calls to a CancelFunc do nothing. type CancelFunc = internal.CancelFunc diff --git a/workflow/workflow.go b/workflow/workflow.go index d602faa5a..12967e431 100644 --- a/workflow/workflow.go +++ b/workflow/workflow.go @@ -15,13 +15,13 @@ import ( type VersioningBehavior = internal.VersioningBehavior const ( - // Workflow versioning policy unknown. + // VersioningBehaviorUnspecified means the workflow versioning policy is unknown. VersioningBehaviorUnspecified = internal.VersioningBehaviorUnspecified - // Workflow should be pinned to the current Build ID until manually moved. + // VersioningBehaviorPinned means the workflow should be pinned to the current Build ID until manually moved. VersioningBehaviorPinned = internal.VersioningBehaviorPinned - // Workflow automatically moves to the latest version (default Build ID of the task queue) + // VersioningBehaviorAutoUpgrade means the workflow automatically moves to the latest version (default Build ID of the task queue) // when the next task is dispatched. VersioningBehaviorAutoUpgrade = internal.VersioningBehaviorAutoUpgrade ) @@ -32,9 +32,9 @@ const ( type HandlerUnfinishedPolicy = internal.HandlerUnfinishedPolicy const ( - // WarnAndAbandon issue a warning in addition to abandoning. + // HandlerUnfinishedPolicyWarnAndAbandon issues a warning in addition to abandoning. HandlerUnfinishedPolicyWarnAndAbandon = internal.HandlerUnfinishedPolicyWarnAndAbandon - // ABANDON the handler. + // HandlerUnfinishedPolicyAbandon abandons the handler. // // In the case of an update handler this means that the client will receive an error rather // than the update result. @@ -46,20 +46,20 @@ const ( type NexusOperationCancellationType = internal.NexusOperationCancellationType const ( - // Nexus operation cancellation type is unknown. + // NexusOperationCancellationTypeUnspecified means the Nexus operation cancellation type is unknown. NexusOperationCancellationTypeUnspecified NexusOperationCancellationType = iota - // Do not request cancellation of the Nexus operation. + // NexusOperationCancellationTypeAbandon means do not request cancellation of the Nexus operation. NexusOperationCancellationTypeAbandon - // Initiate a cancellation request for the Nexus operation and immediately report cancellation + // NexusOperationCancellationTypeTryCancel initiates a cancellation request for the Nexus operation and immediately reports cancellation // to the caller. NexusOperationCancellationTypeTryCancel - // Request cancellation of the Nexus operation and wait for confirmation that the request was received. + // NexusOperationCancellationTypeWaitRequested requests cancellation of the Nexus operation and waits for confirmation that the request was received. NexusOperationCancellationTypeWaitRequested - // Wait for the Nexus operation to complete. Default. + // NexusOperationCancellationTypeWaitCompleted waits for the Nexus operation to complete. This is the default. NexusOperationCancellationTypeWaitCompleted ) @@ -830,7 +830,7 @@ func AllHandlersFinished(ctx Context) bool { return internal.AllHandlersFinished(ctx) } -// Create a [NexusClient] from an endpoint name and a service name. +// NewNexusClient creates a [NexusClient] from an endpoint name and a service name. func NewNexusClient(endpoint, service string) NexusClient { return internal.NewNexusClient(endpoint, service) }