Skip to content

Commit 1540ba4

Browse files
authored
Fix doc links on pkg.go.dev (#1795)
* Fix doc links * fix go.temporal.io/sdk links
1 parent 22ebdc0 commit 1540ba4

File tree

7 files changed

+39
-38
lines changed

7 files changed

+39
-38
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Go SDK version v1.26.0 switched from using https://github.com/gogo/protobuf to h
6666
### Incompatible proto/json encoding
6767

6868
Proto enums will, when formatted to JSON, now be in SCREAMING_SNAKE_CASE rather than PascalCase.
69-
* If trying to deserialize old JSON with PascalCase to proto use [go.temporal.io/api/temporalproto]
69+
* If trying to deserialize old JSON with PascalCase to proto use [go.temporal.io/api/temporalproto](https://pkg.go.dev/go.temporal.io/api/temporalproto).
7070

7171
If users used Temporal proto types in their Workflows, such as for activity output, users may need to modify the default data converter to handle these payloads.
7272
``` go

activity/activity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func GetMetricsHandler(ctx context.Context) metrics.Handler {
7272
// can check error with TimeoutType()/Details().
7373
//
7474
// Note: If using asynchronous activity completion,
75-
// after returning [ErrResultPending] users should heartbeat with [client.Client.RecordActivityHeartbeat]
75+
// after returning [ErrResultPending] users should heartbeat with [go.temporal.io/sdk/client.Client.RecordActivityHeartbeat]
7676
func RecordHeartbeat(ctx context.Context, details ...interface{}) {
7777
internal.RecordActivityHeartbeat(ctx, details...)
7878
}

activity/doc.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ the Temporal managed service.
102102
}
103103
104104
When the Activity times out due to a missed heartbeat, the last value of the details (progress in the above sample) is
105-
returned from the [workflow.ExecuteActivity] function as the details field of [temporal.TimeoutError] with TimeoutType_HEARTBEAT.
105+
returned from the [go.temporal.io/sdk/workflow.ExecuteActivity] function as the details field of
106+
[go.temporal.io/sdk/temporal.TimeoutError] with TimeoutType_HEARTBEAT.
106107
107108
It is also possible to heartbeat an Activity from an external source:
108109

client/client.go

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ type (
188188
StartWorkflowOptions = internal.StartWorkflowOptions
189189

190190
// WithStartWorkflowOperation defines how to start a workflow when using UpdateWithStartWorkflow.
191-
// See [Client.NewWithStartWorkflowOperation] and [Client.UpdateWithStartWorkflow].
191+
// See [client.Client.NewWithStartWorkflowOperation] and [client.Client.UpdateWithStartWorkflow].
192192
// NOTE: Experimental
193193
WithStartWorkflowOperation = internal.WithStartWorkflowOperation
194194

@@ -299,7 +299,7 @@ type (
299299
UpdateWorkflowOptions = internal.UpdateWorkflowOptions
300300

301301
// UpdateWithStartWorkflowOptions encapsulates the parameters used by UpdateWithStartWorkflow.
302-
// See [Client.UpdateWithStartWorkflow] and [Client.NewWithStartWorkflowOperation].
302+
// See [client.Client.UpdateWithStartWorkflow] and [client.Client.NewWithStartWorkflowOperation].
303303
// NOTE: Experimental
304304
UpdateWithStartWorkflowOptions = internal.UpdateWithStartWorkflowOptions
305305

@@ -341,49 +341,49 @@ type (
341341
// NOTE: Experimental
342342
DeploymentMetadataUpdate = internal.DeploymentMetadataUpdate
343343

344-
// DeploymentDescribeOptions provides options for [DeploymentClient.Describe].
344+
// DeploymentDescribeOptions provides options for [internal.DeploymentClient.Describe].
345345
// NOTE: Experimental
346346
DeploymentDescribeOptions = internal.DeploymentDescribeOptions
347347

348-
// DeploymentDescription is the response type for [DeploymentClient.Describe].
348+
// DeploymentDescription is the response type for [internal.DeploymentClient.Describe].
349349
// NOTE: Experimental
350350
DeploymentDescription = internal.DeploymentDescription
351351

352-
// DeploymentGetReachabilityOptions provides options for [DeploymentClient.GetReachability].
352+
// DeploymentGetReachabilityOptions provides options for [internal.DeploymentClient.GetReachability].
353353
// NOTE: Experimental
354354
DeploymentGetReachabilityOptions = internal.DeploymentGetReachabilityOptions
355355

356-
// DeploymentGetCurrentOptions provides options for [DeploymentClient.GetCurrent].
356+
// DeploymentGetCurrentOptions provides options for [internal.DeploymentClient.GetCurrent].
357357
// NOTE: Experimental
358358
DeploymentGetCurrentOptions = internal.DeploymentGetCurrentOptions
359359

360-
// DeploymentGetCurrentResponse is the response type for [DeploymentClient.GetCurrent].
360+
// DeploymentGetCurrentResponse is the response type for [internal.DeploymentClient.GetCurrent].
361361
// NOTE: Experimental
362362
DeploymentGetCurrentResponse = internal.DeploymentGetCurrentResponse
363363

364-
// DeploymentSetCurrentOptions provides options for [DeploymentClient.SetCurrent].
364+
// DeploymentSetCurrentOptions provides options for [internal.DeploymentClient.SetCurrent].
365365
// NOTE: Experimental
366366
DeploymentSetCurrentOptions = internal.DeploymentSetCurrentOptions
367367

368-
// DeploymentSetCurrentResponse is the response type for [DeploymentClient.SetCurrent].
368+
// DeploymentSetCurrentResponse is the response type for [internal.DeploymentClient.SetCurrent].
369369
// NOTE: Experimental
370370
DeploymentSetCurrentResponse = internal.DeploymentSetCurrentResponse
371371

372372
// DeploymentClient is the server interface to manage deployments.
373373
// NOTE: Experimental
374374
DeploymentClient = internal.DeploymentClient
375375

376-
// UpdateWorkflowExecutionOptionsRequest is a request for [Client.UpdateWorkflowExecutionOptions].
376+
// UpdateWorkflowExecutionOptionsRequest is a request for [client.Client.UpdateWorkflowExecutionOptions].
377377
// NOTE: Experimental
378378
UpdateWorkflowExecutionOptionsRequest = internal.UpdateWorkflowExecutionOptionsRequest
379379

380380
// WorkflowExecutionOptions contains a set of properties of an existing workflow
381-
// that can be overriden using [UpdateWorkflowExecutionOptions].
381+
// that can be overriden using [client.Client.UpdateWorkflowExecutionOptions].
382382
// NOTE: Experimental
383383
WorkflowExecutionOptions = internal.WorkflowExecutionOptions
384384

385385
// WorkflowExecutionOptionsChanges describes changes to [WorkflowExecutionOptions]
386-
// in the [UpdateWorkflowExecutionOptions] API.
386+
// in the [client.Client.UpdateWorkflowExecutionOptions] API.
387387
// NOTE: Experimental
388388
WorkflowExecutionOptionsChanges = internal.WorkflowExecutionOptionsChanges
389389

@@ -461,27 +461,27 @@ type (
461461
// Deprecated: Replaced by the new worker versioning api.
462462
TaskQueueReachability = internal.TaskQueueReachability
463463

464-
// DescribeTaskQueueEnhancedOptions is the input to [Client.DescribeTaskQueueEnhanced].
464+
// DescribeTaskQueueEnhancedOptions is the input to [client.Client.DescribeTaskQueueEnhanced].
465465
DescribeTaskQueueEnhancedOptions = internal.DescribeTaskQueueEnhancedOptions
466466

467467
// TaskQueueVersionSelection is a task queue filter based on versioning.
468-
// It is an optional component of [Client.DescribeTaskQueueEnhancedOptions].
468+
// It is an optional component of [DescribeTaskQueueEnhancedOptions].
469469
// WARNING: Worker versioning is currently experimental.
470470
TaskQueueVersionSelection = internal.TaskQueueVersionSelection
471471

472-
// TaskQueueDescription is the response to [Client.DescribeTaskQueueEnhanced].
472+
// TaskQueueDescription is the response to [client.Client.DescribeTaskQueueEnhanced].
473473
TaskQueueDescription = internal.TaskQueueDescription
474474

475475
// TaskQueueVersionInfo includes task queue information per Build ID.
476-
// It is part of [Client.TaskQueueDescription].
476+
// It is part of [TaskQueueDescription].
477477
TaskQueueVersionInfo = internal.TaskQueueVersionInfo
478478

479479
// TaskQueueTypeInfo specifies task queue information per task type and Build ID.
480-
// It is included in [Client.TaskQueueVersionInfo].
480+
// It is included in [TaskQueueVersionInfo].
481481
TaskQueueTypeInfo = internal.TaskQueueTypeInfo
482482

483483
// TaskQueuePollerInfo provides information about a worker/client polling a task queue.
484-
// It is used by [Client.TaskQueueTypeInfo].
484+
// It is used by [TaskQueueTypeInfo].
485485
TaskQueuePollerInfo = internal.TaskQueuePollerInfo
486486

487487
// TaskQueueStats contains statistics about task queue backlog and activity.
@@ -492,18 +492,18 @@ type (
492492

493493
// WorkerVersionCapabilities includes a worker's build identifier
494494
// and whether it is choosing to use the versioning feature.
495-
// It is an optional component of [Client.TaskQueuePollerInfo].
495+
// It is an optional component of [TaskQueuePollerInfo].
496496
// WARNING: Worker versioning is currently experimental.
497497
WorkerVersionCapabilities = internal.WorkerVersionCapabilities
498498

499-
// UpdateWorkerVersioningRulesOptions is the input to [Client.UpdateWorkerVersioningRules].
499+
// UpdateWorkerVersioningRulesOptions is the input to [client.Client.UpdateWorkerVersioningRules].
500500
// WARNING: Worker versioning is currently experimental.
501501
UpdateWorkerVersioningRulesOptions = internal.UpdateWorkerVersioningRulesOptions
502502

503-
// VersioningConflictToken is a conflict token to serialize calls to Client.UpdateWorkerVersioningRules.
503+
// VersioningConflictToken is a conflict token to serialize calls to [client.Client.UpdateWorkerVersioningRules].
504504
// An update with an old token fails with `serviceerror.FailedPrecondition`.
505-
// The current token can be obtained with [GetWorkerVersioningRules],
506-
// or returned by a successful [UpdateWorkerVersioningRules].
505+
// The current token can be obtained with [client.Client.GetWorkerVersioningRules],
506+
// or returned by a successful [client.Client.UpdateWorkerVersioningRules].
507507
// WARNING: Worker versioning is currently experimental.
508508
VersioningConflictToken = internal.VersioningConflictToken
509509

@@ -590,11 +590,11 @@ type (
590590
// WARNING: Worker versioning is currently experimental.
591591
VersioningOperationCommitBuildID = internal.VersioningOperationCommitBuildID
592592

593-
// GetWorkerVersioningOptions is the input to [Client.GetWorkerVersioningRules].
593+
// GetWorkerVersioningOptions is the input to [client.Client.GetWorkerVersioningRules].
594594
// WARNING: Worker versioning is currently experimental.
595595
GetWorkerVersioningOptions = internal.GetWorkerVersioningOptions
596596

597-
// WorkerVersioningRules is the response for [Client.GetWorkerVersioningRules].
597+
// WorkerVersioningRules is the response for [client.Client.GetWorkerVersioningRules].
598598
// WARNING: Worker versioning is currently experimental.
599599
WorkerVersioningRules = internal.WorkerVersioningRules
600600

@@ -677,7 +677,7 @@ type (
677677
options StartWorkflowOptions, workflow interface{}, workflowArgs ...interface{}) (WorkflowRun, error)
678678

679679
// NewWithStartWorkflowOperation returns a WithStartWorkflowOperation for use with UpdateWithStartWorkflow.
680-
// See [Client.UpdateWithStartWorkflow].
680+
// See [client.Client.UpdateWithStartWorkflow].
681681
// NOTE: Experimental
682682
NewWithStartWorkflowOperation(options StartWorkflowOptions, workflow interface{}, args ...interface{}) WithStartWorkflowOperation
683683

@@ -913,13 +913,13 @@ type (
913913
// Allows you to update the worker-build-id based version sets for a particular task queue. This is used in
914914
// conjunction with workers who specify their build id and thus opt into the feature.
915915
//
916-
// Deprecated: Use [UpdateWorkerVersioningRules] with the versioning api.
916+
// Deprecated: Use [client.Client.UpdateWorkerVersioningRules] with the versioning api.
917917
UpdateWorkerBuildIdCompatibility(ctx context.Context, options *UpdateWorkerBuildIdCompatibilityOptions) error
918918

919919
// GetWorkerBuildIdCompatibility
920920
// Returns the worker-build-id based version sets for a particular task queue.
921921
//
922-
// Deprecated: Use [GetWorkerVersioningRules] with the versioning api.
922+
// Deprecated: Use [client.Client.GetWorkerVersioningRules] with the versioning api.
923923
GetWorkerBuildIdCompatibility(ctx context.Context, options *GetWorkerBuildIdCompatibilityOptions) (*WorkerBuildIDVersionSets, error)
924924

925925
// GetWorkerTaskReachability
@@ -1164,7 +1164,7 @@ var (
11641164
)
11651165

11661166
// NewValue creates a new [converter.EncodedValue] which can be used to decode binary data returned by Temporal. For example:
1167-
// User had Activity.RecordHeartbeat(ctx, "my-heartbeat") and then got response from calling Client.DescribeWorkflowExecution.
1167+
// User had Activity.RecordHeartbeat(ctx, "my-heartbeat") and then got response from calling [client.Client.DescribeWorkflowExecution].
11681168
// The response contains binary field PendingActivityInfo.HeartbeatDetails,
11691169
// which can be decoded by using:
11701170
//
@@ -1175,7 +1175,7 @@ func NewValue(data *commonpb.Payloads) converter.EncodedValue {
11751175
}
11761176

11771177
// NewValues creates a new [converter.EncodedValues] which can be used to decode binary data returned by Temporal. For example:
1178-
// User had Activity.RecordHeartbeat(ctx, "my-heartbeat", 123) and then got response from calling Client.DescribeWorkflowExecution.
1178+
// User had Activity.RecordHeartbeat(ctx, "my-heartbeat", 123) and then got response from calling [client.Client.DescribeWorkflowExecution].
11791179
// The response contains binary field PendingActivityInfo.HeartbeatDetails,
11801180
// which can be decoded by using:
11811181
//

contrib/tally/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func NewMetricsHandler(scope tally.Scope) client.MetricsHandler {
4848
}
4949

5050
// ScopeFromHandler returns the underlying scope of the handler. Callers may
51-
// need to check [workflow.IsReplaying] to avoid recording metrics during
51+
// need to check [go.temporal.io/sdk/workflow.IsReplaying] to avoid recording metrics during
5252
// replay. If this handler was not created via this package, [github.com/uber-go/tally.NoopScope] is
5353
// returned.
5454
//

workflow/doc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ Workflows that need to rerun periodically could naively be implemented as a big
381381
logic of the workflow is inside the body of the for loop. The problem with this approach is that the history for that
382382
workflow will keep growing to a point where it reaches the maximum size enforced by the service.
383383
384-
[ContinueAsNew] is the low level construct that enables implementing such workflows without the risk of failures down the
384+
ContinueAsNew is the low level construct that enables implementing such workflows without the risk of failures down the
385385
road. The operation atomically completes the current execution and starts a new execution of the workflow with the same
386386
workflow ID. The new execution will not carry over any history from the old execution. To trigger this behavior, the
387387
workflow function should terminate by returning the special ContinueAsNewError error:
@@ -552,9 +552,9 @@ The code below implements the unit tests for the SimpleWorkflow sample.
552552
553553
First, we define a "test suite" struct that absorbs both the basic suite functionality from [testify]
554554
via suite.Suite and the suite functionality from the Temporal test
555-
framework via [testsuite.WorkflowTestSuite]. Since every test in this suite will test our workflow we add a property to
555+
framework via [go.temporal.io/sdk/testsuite.WorkflowTestSuite]. Since every test in this suite will test our workflow we add a property to
556556
our struct to hold an instance of the test environment. This will allow us to initialize the test environment in a
557-
setup method. For testing workflows we use a [testsuite.TestWorkflowEnvironment].
557+
setup method. For testing workflows we use a [go.temporal.io/sdk/testsuite.TestWorkflowEnvironment].
558558
559559
We then implement a SetupTest method to setup a new test environment before each test. Doing so ensure that each test
560560
runs in it's own isolated sandbox. We also implement an AfterTest function where we assert that all mocks we setup were

workflow/workflow.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ type (
144144
// NOTE: Experimental
145145
NexusOperationFuture = internal.NexusOperationFuture
146146

147-
// NexusOperationExecution is the result of [NexusOperationFuture.GetNexusOperationExecution].
147+
// NexusOperationExecution is the result of [internal.NexusOperationFuture.GetNexusOperationExecution].
148148
//
149149
// NOTE: Experimental
150150
NexusOperationExecution = internal.NexusOperationExecution

0 commit comments

Comments
 (0)