@@ -47,14 +47,20 @@ import (
47
47
48
48
const (
49
49
// DefaultNamespace is the namespace name which is used if not passed with options.
50
+ //
51
+ // Exposed as: [go.temporal.io/sdk/client.DefaultNamespace]
50
52
DefaultNamespace = "default"
51
53
52
54
// QueryTypeStackTrace is the build in query type for Client.QueryWorkflow() call. Use this query type to get the call
53
55
// stack of the workflow. The result will be a string encoded in the EncodedValue.
56
+ //
57
+ // Exposed as: [go.temporal.io/sdk/client.QueryTypeStackTrace]
54
58
QueryTypeStackTrace string = "__stack_trace"
55
59
56
60
// QueryTypeOpenSessions is the build in query type for Client.QueryWorkflow() call. Use this query type to get all open
57
61
// sessions in the workflow. The result will be a list of SessionInfo encoded in the EncodedValue.
62
+ //
63
+ // Exposed as: [go.temporal.io/sdk/client.QueryTypeOpenSessions]
58
64
QueryTypeOpenSessions string = "__open_sessions"
59
65
60
66
// QueryTypeWorkflowMetadata is the query name for the workflow metadata.
@@ -430,6 +436,8 @@ type (
430
436
}
431
437
432
438
// ClientOptions are optional parameters for Client creation.
439
+ //
440
+ // Exposed as: [go.temporal.io/sdk/client.Options]
433
441
ClientOptions struct {
434
442
// Optional: To set the host:port for this client to connect to.
435
443
// default: localhost:7233
@@ -516,6 +524,8 @@ type (
516
524
// CloudOperationsClientOptions are parameters for CloudOperationsClient creation.
517
525
//
518
526
// WARNING: Cloud operations client is currently experimental.
527
+ //
528
+ // Exposed as: [go.temporal.io/sdk/client.CloudOperationsClientOptions]
519
529
CloudOperationsClientOptions struct {
520
530
// Optional: The credentials for this client. This is essentially required.
521
531
// See [go.temporal.io/sdk/client.NewAPIKeyStaticCredentials],
@@ -562,6 +572,8 @@ type (
562
572
}
563
573
564
574
// ConnectionOptions is provided by SDK consumers to control optional connection params.
575
+ //
576
+ // Exposed as: [go.temporal.io/sdk/client.ConnectionOptions]
565
577
ConnectionOptions struct {
566
578
// TLS configures connection level security credentials.
567
579
TLS * tls.Config
@@ -622,6 +634,8 @@ type (
622
634
// StartWorkflowOptions configuration parameters for starting a workflow execution.
623
635
// The current timeout resolution implementation is in seconds and uses math.Ceil(d.Seconds()) as the duration. But is
624
636
// subjected to change in the future.
637
+ //
638
+ // Exposed as: [go.temporal.io/sdk/client.StartWorkflowOptions]
625
639
StartWorkflowOptions struct {
626
640
// ID - The business identifier of the workflow execution.
627
641
// Optional: defaulted to a uuid.
@@ -779,6 +793,8 @@ type (
779
793
// started time. Because of that, to check an activity has started or not, you cannot rely on history events. Instead,
780
794
// you can use CLI to describe the workflow to see the status of the activity:
781
795
// tctl --ns <namespace> wf desc -w <wf-id>
796
+ //
797
+ // Exposed as: [go.temporal.io/sdk/temporal.RetryPolicy]
782
798
RetryPolicy struct {
783
799
// Backoff interval for the first retry. If BackoffCoefficient is 1.0 then it is used for all retries.
784
800
// If not set or set to 0, a default interval of 1s will be used.
@@ -840,19 +856,25 @@ type (
840
856
)
841
857
842
858
// Credentials are optional credentials that can be specified in ClientOptions.
859
+ //
860
+ // Exposed as: [go.temporal.io/sdk/client.Credentials]
843
861
type Credentials interface {
844
862
applyToOptions (* ConnectionOptions ) error
845
863
// Can return nil to have no interceptor
846
864
gRPCInterceptor () grpc.UnaryClientInterceptor
847
865
}
848
866
849
867
// DialClient creates a client and attempts to connect to the server.
868
+ //
869
+ // Exposed as: [go.temporal.io/sdk/client.DialContext]
850
870
func DialClient (ctx context.Context , options ClientOptions ) (Client , error ) {
851
871
options .ConnectionOptions .disableEagerConnection = false
852
872
return NewClient (ctx , options )
853
873
}
854
874
855
875
// NewLazyClient creates a client and does not attempt to connect to the server.
876
+ //
877
+ // Exposed as: [go.temporal.io/sdk/client.NewLazyClient]
856
878
func NewLazyClient (options ClientOptions ) (Client , error ) {
857
879
options .ConnectionOptions .disableEagerConnection = true
858
880
return NewClient (context .Background (), options )
@@ -861,12 +883,16 @@ func NewLazyClient(options ClientOptions) (Client, error) {
861
883
// NewClient creates an instance of a workflow client
862
884
//
863
885
// Deprecated: Use DialClient or NewLazyClient instead.
886
+ //
887
+ // Exposed as: [go.temporal.io/sdk/client.NewClient]
864
888
func NewClient (ctx context.Context , options ClientOptions ) (Client , error ) {
865
889
return newClient (ctx , options , nil )
866
890
}
867
891
868
892
// NewClientFromExisting creates a new client using the same connection as the
869
893
// existing client.
894
+ //
895
+ // Exposed as: [go.temporal.io/sdk/client.NewClientFromExistingWithContext]
870
896
func NewClientFromExisting (ctx context.Context , existingClient Client , options ClientOptions ) (Client , error ) {
871
897
existing , _ := existingClient .(* WorkflowClient )
872
898
if existing == nil {
@@ -1012,6 +1038,8 @@ func NewServiceClient(workflowServiceClient workflowservice.WorkflowServiceClien
1012
1038
1013
1039
// DialCloudOperationsClient creates a cloud client to perform cloud-management
1014
1040
// operations.
1041
+ //
1042
+ // Exposed as: [go.temporal.io/sdk/client.DialCloudOperationsClient]
1015
1043
func DialCloudOperationsClient (ctx context.Context , options CloudOperationsClientOptions ) (CloudOperationsClient , error ) {
1016
1044
// Set defaults
1017
1045
if options .MetricsHandler == nil {
@@ -1089,6 +1117,8 @@ func (op *withStartWorkflowOperationImpl) set(workflowRun WorkflowRun, err error
1089
1117
}
1090
1118
1091
1119
// NewNamespaceClient creates an instance of a namespace client, to manager lifecycle of namespaces.
1120
+ //
1121
+ // Exposed as: [go.temporal.io/sdk/client.NewNamespaceClient]
1092
1122
func NewNamespaceClient (options ClientOptions ) (NamespaceClient , error ) {
1093
1123
// Initialize root tags
1094
1124
if options .MetricsHandler == nil {
@@ -1129,6 +1159,8 @@ func newNamespaceServiceClient(workflowServiceClient workflowservice.WorkflowSer
1129
1159
//
1130
1160
// var result string // This need to be same type as the one passed to RecordHeartbeat
1131
1161
// NewValue(data).Get(&result)
1162
+ //
1163
+ // Exposed as: [go.temporal.io/sdk/client.NewValue]
1132
1164
func NewValue (data * commonpb.Payloads ) converter.EncodedValue {
1133
1165
return newEncodedValue (data , nil )
1134
1166
}
@@ -1141,16 +1173,20 @@ func NewValue(data *commonpb.Payloads) converter.EncodedValue {
1141
1173
// var result1 string
1142
1174
// var result2 int // These need to be same type as those arguments passed to RecordHeartbeat
1143
1175
// NewValues(data).Get(&result1, &result2)
1176
+ //
1177
+ // Exposed as: [go.temporal.io/sdk/client.NewValues]
1144
1178
func NewValues (data * commonpb.Payloads ) converter.EncodedValues {
1145
1179
return newEncodedValues (data , nil )
1146
1180
}
1147
1181
1148
1182
type apiKeyCredentials func (context.Context ) (string , error )
1149
1183
1184
+ // Exposed as: [go.temporal.io/sdk/client.NewAPIKeyStaticCredentials]
1150
1185
func NewAPIKeyStaticCredentials (apiKey string ) Credentials {
1151
1186
return NewAPIKeyDynamicCredentials (func (ctx context.Context ) (string , error ) { return apiKey , nil })
1152
1187
}
1153
1188
1189
+ // Exposed as: [go.temporal.io/sdk/client.NewAPIKeyDynamicCredentials]
1154
1190
func NewAPIKeyDynamicCredentials (apiKeyCallback func (context.Context ) (string , error )) Credentials {
1155
1191
return apiKeyCredentials (apiKeyCallback )
1156
1192
}
@@ -1181,6 +1217,7 @@ func (a apiKeyCredentials) gRPCIntercept(
1181
1217
1182
1218
type mTLSCredentials tls.Certificate
1183
1219
1220
+ // Exposed as: [go.temporal.io/sdk/client.NewMTLSCredentials]
1184
1221
func NewMTLSCredentials (certificate tls.Certificate ) Credentials { return mTLSCredentials (certificate ) }
1185
1222
1186
1223
func (m mTLSCredentials ) applyToOptions (opts * ConnectionOptions ) error {
@@ -1198,11 +1235,15 @@ func (mTLSCredentials) gRPCInterceptor() grpc.UnaryClientInterceptor { return ni
1198
1235
// WorkflowUpdateServiceTimeoutOrCanceledError is an error that occurs when an update call times out or is cancelled.
1199
1236
//
1200
1237
// Note, this is not related to any general concept of timing out or cancelling a running update, this is only related to the client call itself.
1238
+ //
1239
+ // Exposed as: [go.temporal.io/sdk/client.WorkflowUpdateServiceTimeoutOrCanceledError]
1201
1240
type WorkflowUpdateServiceTimeoutOrCanceledError struct {
1202
1241
cause error
1203
1242
}
1204
1243
1205
1244
// NewWorkflowUpdateServiceTimeoutOrCanceledError creates a new WorkflowUpdateServiceTimeoutOrCanceledError.
1245
+ //
1246
+ // Exposed as: [go.temporal.io/sdk/client.NewWorkflowUpdateServiceTimeoutOrCanceledError]
1206
1247
func NewWorkflowUpdateServiceTimeoutOrCanceledError (err error ) * WorkflowUpdateServiceTimeoutOrCanceledError {
1207
1248
return & WorkflowUpdateServiceTimeoutOrCanceledError {
1208
1249
cause : err ,
0 commit comments