diff --git a/docs/docs/configuration/service.mdx b/docs/docs/configuration/service.mdx
index 2e645abb..ba18d26f 100644
--- a/docs/docs/configuration/service.mdx
+++ b/docs/docs/configuration/service.mdx
@@ -18,6 +18,21 @@ service Example {
## Options
+### enable_parent_task_queue_for_child_workflows
+
+`bool`
+
+Use parent workflow task queue for child workflows.
+
+```protobuf
+service Example {
+ option (temporal.v1.service) = {
+ task_queue: 'example-v1'
+ enable_parent_task_queue_for_child_workflows: true
+ };
+}
+```
+
### patches
[[]temporal.v1.Patch](https://buf.build/cludden/protoc-gen-go-temporal/docs/main:temporal.v1#temporal.v1.Patch)
diff --git a/gen/example/helloworld/v1/example_temporal.pb.go b/gen/example/helloworld/v1/example_temporal.pb.go
index 2310668f..7cfe0885 100644
--- a/gen/example/helloworld/v1/example_temporal.pb.go
+++ b/gen/example/helloworld/v1/example_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/helloworld/v1/example.proto
diff --git a/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go b/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go
index 45fbe48d..4ff0502a 100644
--- a/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go
+++ b/gen/example/helloworld/v1/helloworldv1xns/example_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/helloworld/v1/example.proto
diff --git a/gen/example/mutex/v1/mutex_temporal.pb.go b/gen/example/mutex/v1/mutex_temporal.pb.go
index 7700f496..7b89d68f 100644
--- a/gen/example/mutex/v1/mutex_temporal.pb.go
+++ b/gen/example/mutex/v1/mutex_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/mutex/v1/mutex.proto
diff --git a/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go b/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go
index 54ab846d..c0afe7fc 100644
--- a/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go
+++ b/gen/example/mutex/v1/mutexv1xns/mutex_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/mutex/v1/mutex.proto
diff --git a/gen/example/schedule/v1/schedule_temporal.pb.go b/gen/example/schedule/v1/schedule_temporal.pb.go
index a4f51c4b..b90d674a 100644
--- a/gen/example/schedule/v1/schedule_temporal.pb.go
+++ b/gen/example/schedule/v1/schedule_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/schedule/v1/schedule.proto
diff --git a/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go b/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go
index 46cafc44..b418cebb 100644
--- a/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go
+++ b/gen/example/schedule/v1/schedulev1xns/schedule_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/schedule/v1/schedule.proto
diff --git a/gen/example/searchattributes/v1/searchattributes_temporal.pb.go b/gen/example/searchattributes/v1/searchattributes_temporal.pb.go
index 5a11a58e..3518d8f8 100644
--- a/gen/example/searchattributes/v1/searchattributes_temporal.pb.go
+++ b/gen/example/searchattributes/v1/searchattributes_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/searchattributes/v1/searchattributes.proto
diff --git a/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go b/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go
index c722f2b4..eb8871fc 100644
--- a/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go
+++ b/gen/example/searchattributes/v1/searchattributesv1xns/searchattributes_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/searchattributes/v1/searchattributes.proto
diff --git a/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go b/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go
index 94d75418..56157127 100644
--- a/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go
+++ b/gen/example/updatabletimer/v1/updatabletimer_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/updatabletimer/v1/updatabletimer.proto
diff --git a/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go b/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go
index 2033fdc7..8ad59a8c 100644
--- a/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go
+++ b/gen/example/updatabletimer/v1/updatabletimerv1xns/updatabletimer_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/updatabletimer/v1/updatabletimer.proto
diff --git a/gen/example/v1/example_temporal.pb.go b/gen/example/v1/example_temporal.pb.go
index 292fd537..cb63d304 100644
--- a/gen/example/v1/example_temporal.pb.go
+++ b/gen/example/v1/example_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/v1/example.proto
diff --git a/gen/example/v1/examplev1xns/example_xns_temporal.pb.go b/gen/example/v1/examplev1xns/example_xns_temporal.pb.go
index 82b8da54..bd6033a0 100644
--- a/gen/example/v1/examplev1xns/example_xns_temporal.pb.go
+++ b/gen/example/v1/examplev1xns/example_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/v1/example.proto
diff --git a/gen/example/xns/v1/xns_temporal.pb.go b/gen/example/xns/v1/xns_temporal.pb.go
index 8a254bbd..10765034 100644
--- a/gen/example/xns/v1/xns_temporal.pb.go
+++ b/gen/example/xns/v1/xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/xns/v1/xns.proto
diff --git a/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go b/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go
index a943672c..18155095 100644
--- a/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go
+++ b/gen/example/xns/v1/xnsv1xns/xns_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: example/xns/v1/xns.proto
diff --git a/gen/temporal/v1/temporal.pb.go b/gen/temporal/v1/temporal.pb.go
index dce212ae..024596a2 100644
--- a/gen/temporal/v1/temporal.pb.go
+++ b/gen/temporal/v1/temporal.pb.go
@@ -775,6 +775,8 @@ type ServiceOptions struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+ // Use parent workflow task queue for child workflows instead of the configured default
+ EnableParentTaskQueueForChildWorkflows bool `protobuf:"varint,4,opt,name=enable_parent_task_queue_for_child_workflows,json=enableParentTaskQueueForChildWorkflows,proto3" json:"enable_parent_task_queue_for_child_workflows,omitempty"`
// Configure patches, by default, patches are introduced in enabled mode
Patches []*Patch `protobuf:"bytes,3,rep,name=patches,proto3" json:"patches,omitempty"`
// Default namespace for child workflows, activities
@@ -817,6 +819,13 @@ func (*ServiceOptions) Descriptor() ([]byte, []int) {
return file_temporal_v1_temporal_proto_rawDescGZIP(), []int{6}
}
+func (x *ServiceOptions) GetEnableParentTaskQueueForChildWorkflows() bool {
+ if x != nil {
+ return x.EnableParentTaskQueueForChildWorkflows
+ }
+ return false
+}
+
func (x *ServiceOptions) GetPatches() []*Patch {
if x != nil {
return x.Patches
@@ -1706,249 +1715,255 @@ var file_temporal_v1_temporal_proto_rawDesc = []byte{
0x72, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x6e, 0x6f, 0x6e,
0x52, 0x65, 0x74, 0x72, 0x79, 0x61, 0x62, 0x6c, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x54, 0x79,
- 0x70, 0x65, 0x73, 0x22, 0x7f, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73,
- 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
- 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63,
- 0x68, 0x65, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65,
- 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75,
- 0x65, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x51,
- 0x75, 0x65, 0x75, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
- 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e,
- 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72,
- 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74,
- 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x12, 0x2c, 0x0a,
- 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12,
- 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74,
- 0x63, 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x0d,
- 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0e, 0x0a,
- 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a,
- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
- 0x65, 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03,
- 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31,
- 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12,
- 0x1a, 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
- 0x08, 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x0e, 0x77,
- 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20,
- 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76,
- 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x77, 0x61,
- 0x69, 0x74, 0x46, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x77, 0x61,
- 0x69, 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
- 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61,
- 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x77, 0x61,
- 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18,
- 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
- 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x22, 0x9b, 0x09, 0x0a, 0x0f,
- 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
- 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
- 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x11,
- 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a,
- 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74,
- 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66,
- 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79,
- 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61,
- 0x6c, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72,
- 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x06, 0x73, 0x69,
- 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03,
- 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
- 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x12, 0x46, 0x0a, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74,
- 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
- 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69,
- 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
- 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x64, 0x5f,
- 0x72, 0x65, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01,
- 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31,
- 0x2e, 0x49, 0x44, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d,
- 0x69, 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x0a,
- 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09,
- 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12,
- 0x4e, 0x0a, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f,
- 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x74,
- 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e,
- 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x11, 0x70, 0x61,
- 0x72, 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12,
- 0x2c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b,
- 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50,
- 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x3b, 0x0a,
- 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76,
- 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72,
- 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x72, 0x75,
- 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x54,
- 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68,
- 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x10, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75,
- 0x74, 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75,
- 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65,
- 0x75, 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f,
- 0x75, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
- 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74,
- 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
- 0x12, 0x32, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6e,
- 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52,
- 0x13, 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61,
- 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e,
- 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x1a, 0x4c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79,
- 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72,
- 0x65, 0x66, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x4e,
- 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x52, 0x03, 0x78, 0x6e, 0x73, 0x1a, 0x63, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12,
- 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65,
- 0x66, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
- 0x52, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x03,
+ 0x70, 0x65, 0x73, 0x22, 0xdd, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5c, 0x0a, 0x2c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
+ 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65,
+ 0x75, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x5f, 0x77, 0x6f, 0x72,
+ 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x26, 0x65, 0x6e,
+ 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75,
+ 0x65, 0x75, 0x65, 0x46, 0x6f, 0x72, 0x43, 0x68, 0x69, 0x6c, 0x64, 0x57, 0x6f, 0x72, 0x6b, 0x66,
+ 0x6c, 0x6f, 0x77, 0x73, 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
+ 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68,
+ 0x65, 0x73, 0x12, 0x20, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73,
+ 0x70, 0x61, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65,
+ 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75,
+ 0x65, 0x75, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x0d, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
+ 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x07,
+ 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e,
+ 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x63,
+ 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x22, 0xad, 0x02, 0x0a, 0x0d, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0e, 0x0a, 0x02,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x2c, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e,
+ 0x50, 0x61, 0x74, 0x63, 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x1a,
+ 0x0a, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x12, 0x3d, 0x0a, 0x0e, 0x77, 0x61,
+ 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31,
+ 0x2e, 0x57, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0c, 0x77, 0x61, 0x69,
+ 0x74, 0x46, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x67, 0x65, 0x12, 0x3c, 0x0a, 0x0b, 0x77, 0x61, 0x69,
+ 0x74, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17,
+ 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x69,
+ 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0a, 0x77, 0x61, 0x69,
+ 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x05,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
0x76, 0x31, 0x2e, 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x1a, 0x4d, 0x0a, 0x06, 0x55, 0x70,
- 0x64, 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28,
- 0x09, 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x02, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76,
- 0x31, 0x2e, 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x22, 0xe2, 0x04, 0x0a, 0x12, 0x58, 0x4e,
- 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
- 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
- 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65,
- 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75,
- 0x65, 0x75, 0x65, 0x12, 0x54, 0x0a, 0x19, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f,
- 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
- 0x6e, 0x52, 0x16, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x6f, 0x43, 0x6c, 0x6f,
- 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x54, 0x0a, 0x19, 0x73, 0x63, 0x68,
- 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74,
- 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
- 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
- 0x65, 0x54, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12,
- 0x4e, 0x0a, 0x16, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73,
- 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x73, 0x74, 0x61, 0x72,
- 0x74, 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12,
- 0x48, 0x0a, 0x12, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x74,
- 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x22, 0x9b, 0x09, 0x0a, 0x0f, 0x57,
+ 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x18, 0x11, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x05,
+ 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x65,
+ 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
+ 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52,
+ 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
+ 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x52, 0x06, 0x73, 0x69, 0x67,
+ 0x6e, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76,
+ 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x12, 0x46, 0x0a, 0x11, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69,
+ 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
- 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61,
- 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x11, 0x68, 0x65, 0x61,
- 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05,
- 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
- 0x10, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75,
- 0x74, 0x12, 0x3b, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63,
- 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72,
- 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63,
- 0x79, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4e,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x64, 0x5f, 0x72,
+ 0x65, 0x75, 0x73, 0x65, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e,
+ 0x49, 0x44, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0d, 0x69,
+ 0x64, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x20, 0x0a, 0x09,
+ 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42,
+ 0x02, 0x18, 0x01, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x4e,
0x0a, 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x70,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x74, 0x65,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x74, 0x65,
0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74,
0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x11, 0x70, 0x61, 0x72,
- 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2a, 0x3f,
- 0x0a, 0x0a, 0x43, 0x4c, 0x49, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x14,
- 0x43, 0x4c, 0x49, 0x5f, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41,
- 0x4c, 0x42, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x49, 0x5f, 0x46, 0x45,
- 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x2a,
- 0x83, 0x02, 0x0a, 0x0d, 0x49, 0x44, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63,
- 0x79, 0x12, 0x28, 0x0a, 0x24, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x44,
- 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e,
- 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x57,
- 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45,
- 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x44, 0x55,
- 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x38, 0x0a, 0x34, 0x57, 0x4f, 0x52,
- 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50,
- 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x44, 0x55, 0x50, 0x4c,
- 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x4e, 0x4c,
- 0x59, 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f,
- 0x49, 0x44, 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f,
- 0x52, 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45,
- 0x10, 0x03, 0x12, 0x31, 0x0a, 0x2d, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49,
- 0x44, 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54,
- 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x52, 0x55, 0x4e, 0x4e,
- 0x49, 0x4e, 0x47, 0x10, 0x04, 0x2a, 0xa4, 0x01, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74,
- 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x0a, 0x1f, 0x50,
- 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49,
- 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
- 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45,
- 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54,
- 0x45, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c,
- 0x4f, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44,
- 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43,
- 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55,
- 0x45, 0x53, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x03, 0x2a, 0x78, 0x0a, 0x0a,
- 0x57, 0x61, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x57, 0x41,
- 0x49, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
- 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x57, 0x41, 0x49, 0x54, 0x5f,
- 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10,
- 0x01, 0x12, 0x18, 0x0a, 0x14, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59,
- 0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x57,
- 0x41, 0x49, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c,
- 0x45, 0x54, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x5a, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
- 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0xc1, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6d, 0x70,
- 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x88,
- 0x01, 0x01, 0x3a, 0x4e, 0x0a, 0x03, 0x63, 0x6c, 0x69, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76,
- 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc2, 0x38, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e,
- 0x43, 0x4c, 0x49, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x63, 0x6c, 0x69, 0x88,
- 0x01, 0x01, 0x3a, 0x5c, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1e,
+ 0x65, 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2c,
+ 0x0a, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x18, 0x12, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x12, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61,
+ 0x74, 0x63, 0x68, 0x52, 0x07, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x0c,
+ 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31,
+ 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x0b, 0x72, 0x65,
+ 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x3a, 0x0a, 0x0b, 0x72, 0x75, 0x6e,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
- 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc2,
- 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
- 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69,
- 0x6f, 0x6e, 0x73, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01,
- 0x3a, 0x59, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65,
- 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc6, 0x38, 0x20, 0x01,
- 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31,
- 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
- 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x3a, 0x53, 0x0a, 0x05, 0x71,
- 0x75, 0x65, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc3, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65,
- 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x88, 0x01, 0x01,
- 0x3a, 0x56, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x72, 0x75, 0x6e, 0x54, 0x69,
+ 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f,
+ 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x10, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65,
+ 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75,
+ 0x65, 0x12, 0x3c, 0x0a, 0x0c, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75,
+ 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12,
+ 0x32, 0x0a, 0x15, 0x77, 0x61, 0x69, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x5f, 0x63, 0x61, 0x6e, 0x63,
+ 0x65, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13,
+ 0x77, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x6c, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x58,
+ 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x1a, 0x4c, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12,
+ 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65,
+ 0x66, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f,
+ 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x58, 0x4e, 0x53,
+ 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52,
+ 0x03, 0x78, 0x6e, 0x73, 0x1a, 0x63, 0x0a, 0x06, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x10,
+ 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x72, 0x65, 0x66,
+ 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x05, 0x73, 0x74, 0x61, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76,
+ 0x31, 0x2e, 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x1a, 0x4d, 0x0a, 0x06, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x03, 0x72, 0x65, 0x66, 0x12, 0x31, 0x0a, 0x03, 0x78, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31,
+ 0x2e, 0x58, 0x4e, 0x53, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x78, 0x6e, 0x73, 0x22, 0xe2, 0x04, 0x0a, 0x12, 0x58, 0x4e, 0x53,
+ 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65,
+ 0x75, 0x65, 0x12, 0x54, 0x0a, 0x19, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74,
+ 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x16, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x73,
+ 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x54, 0x0a, 0x19, 0x73, 0x63, 0x68, 0x65,
+ 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69,
+ 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x16, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65,
+ 0x54, 0x6f, 0x53, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x4e,
+ 0x0a, 0x16, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x73, 0x74, 0x61, 0x72, 0x74,
+ 0x54, 0x6f, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, 0x48,
+ 0x0a, 0x12, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x69, 0x6e, 0x74, 0x65,
+ 0x72, 0x76, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74,
+ 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x46, 0x0a, 0x11, 0x68, 0x65, 0x61, 0x72,
+ 0x74, 0x62, 0x65, 0x61, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x10,
+ 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74,
+ 0x12, 0x3b, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x72, 0x79, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61,
+ 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x52, 0x0b, 0x72, 0x65, 0x74, 0x72, 0x79, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x4e, 0x0a,
+ 0x13, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x5f, 0x70, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x74, 0x65, 0x6d,
+ 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43,
+ 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x11, 0x70, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2a, 0x3f, 0x0a,
+ 0x0a, 0x43, 0x4c, 0x49, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x43,
+ 0x4c, 0x49, 0x5f, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x44, 0x49, 0x53, 0x41, 0x4c,
+ 0x42, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4c, 0x49, 0x5f, 0x46, 0x45, 0x41,
+ 0x54, 0x55, 0x52, 0x45, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x2a, 0x83,
+ 0x02, 0x0a, 0x0d, 0x49, 0x44, 0x52, 0x65, 0x75, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x12, 0x28, 0x0a, 0x24, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x44, 0x5f,
+ 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2c, 0x0a, 0x28, 0x57, 0x4f,
+ 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f,
+ 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x44, 0x55, 0x50,
+ 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10, 0x01, 0x12, 0x38, 0x0a, 0x34, 0x57, 0x4f, 0x52, 0x4b,
+ 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x44, 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50, 0x4f,
+ 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x4c, 0x4c, 0x4f, 0x57, 0x5f, 0x44, 0x55, 0x50, 0x4c, 0x49,
+ 0x43, 0x41, 0x54, 0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59,
+ 0x10, 0x02, 0x12, 0x2d, 0x0a, 0x29, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49,
+ 0x44, 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52,
+ 0x45, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x10,
+ 0x03, 0x12, 0x31, 0x0a, 0x2d, 0x57, 0x4f, 0x52, 0x4b, 0x46, 0x4c, 0x4f, 0x57, 0x5f, 0x49, 0x44,
+ 0x5f, 0x52, 0x45, 0x55, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x45,
+ 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45, 0x5f, 0x49, 0x46, 0x5f, 0x52, 0x55, 0x4e, 0x4e, 0x49,
+ 0x4e, 0x47, 0x10, 0x04, 0x2a, 0xa4, 0x01, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x43,
+ 0x6c, 0x6f, 0x73, 0x65, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x41,
+ 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43,
+ 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
+ 0x21, 0x0a, 0x1d, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x5f,
+ 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x54, 0x45, 0x52, 0x4d, 0x49, 0x4e, 0x41, 0x54, 0x45,
+ 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c, 0x4f,
+ 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f,
+ 0x4e, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x41, 0x52, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4c,
+ 0x4f, 0x53, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45,
+ 0x53, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x03, 0x2a, 0x78, 0x0a, 0x0a, 0x57,
+ 0x61, 0x69, 0x74, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x1b, 0x0a, 0x17, 0x57, 0x41, 0x49,
+ 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x50,
+ 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x54, 0x54, 0x45, 0x44, 0x10, 0x01,
+ 0x12, 0x18, 0x0a, 0x14, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f,
+ 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41,
+ 0x49, 0x54, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x43, 0x4f, 0x4d, 0x50, 0x4c, 0x45,
+ 0x54, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x5a, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0xc1, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f,
+ 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x88, 0x01,
+ 0x01, 0x3a, 0x4e, 0x0a, 0x03, 0x63, 0x6c, 0x69, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc2, 0x38, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x17, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x43,
+ 0x4c, 0x49, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x03, 0x63, 0x6c, 0x69, 0x88, 0x01,
+ 0x01, 0x3a, 0x5c, 0x0a, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x2e,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
+ 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc2, 0x38,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
+ 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x08, 0x61, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x88, 0x01, 0x01, 0x3a,
+ 0x59, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f,
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74,
- 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc4, 0x38, 0x20, 0x01, 0x28,
- 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e,
- 0x53, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x73,
- 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x3a, 0x56, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x73, 0x18, 0xc5, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70,
- 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01,
- 0x3a, 0x5c, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, 0x67,
- 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d,
- 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0x38, 0x20,
- 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76,
- 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x73, 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x88, 0x01, 0x01, 0x42, 0xb3,
- 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e,
- 0x76, 0x31, 0x42, 0x0d, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74,
- 0x6f, 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
- 0x63, 0x6c, 0x75, 0x64, 0x64, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67,
- 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x67,
- 0x65, 0x6e, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x74,
- 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa,
- 0x02, 0x0b, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b,
- 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x54, 0x65,
- 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
- 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c,
- 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc6, 0x38, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x88, 0x01, 0x01, 0x3a, 0x53, 0x0a, 0x05, 0x71, 0x75,
+ 0x65, 0x72, 0x79, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x18, 0xc3, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x65, 0x6d,
+ 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x88, 0x01, 0x01, 0x3a,
+ 0x56, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68,
+ 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc4, 0x38, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x53,
+ 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x73, 0x69,
+ 0x67, 0x6e, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x3a, 0x56, 0x0a, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0xc5, 0x38, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f,
+ 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x88, 0x01, 0x01, 0x3a,
+ 0x5c, 0x0a, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65,
+ 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xc1, 0x38, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76, 0x31,
+ 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x52, 0x08, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x88, 0x01, 0x01, 0x42, 0xb3, 0x01,
+ 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x76,
+ 0x31, 0x42, 0x0d, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63,
+ 0x6c, 0x75, 0x64, 0x64, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65,
+ 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x67, 0x65,
+ 0x6e, 0x2f, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x76, 0x31, 0x3b, 0x74, 0x65,
+ 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x58, 0x58, 0xaa, 0x02,
+ 0x0b, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x54,
+ 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x54, 0x65, 0x6d,
+ 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x54, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x3a,
+ 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
diff --git a/gen/test/option/v1/option.pb.go b/gen/test/option/v1/option.pb.go
index 400daf6e..fdedbfa3 100644
--- a/gen/test/option/v1/option.pb.go
+++ b/gen/test/option/v1/option.pb.go
@@ -163,6 +163,108 @@ func (x *UpdateWithInputRequest) GetName() string {
return ""
}
+type TestDefaultTaskQueueInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskQueues []string `protobuf:"bytes,1,rep,name=task_queues,json=taskQueues,proto3" json:"task_queues,omitempty"`
+ Depth uint32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
+}
+
+func (x *TestDefaultTaskQueueInput) Reset() {
+ *x = TestDefaultTaskQueueInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_test_option_v1_option_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TestDefaultTaskQueueInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestDefaultTaskQueueInput) ProtoMessage() {}
+
+func (x *TestDefaultTaskQueueInput) ProtoReflect() protoreflect.Message {
+ mi := &file_test_option_v1_option_proto_msgTypes[3]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TestDefaultTaskQueueInput.ProtoReflect.Descriptor instead.
+func (*TestDefaultTaskQueueInput) Descriptor() ([]byte, []int) {
+ return file_test_option_v1_option_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *TestDefaultTaskQueueInput) GetTaskQueues() []string {
+ if x != nil {
+ return x.TaskQueues
+ }
+ return nil
+}
+
+func (x *TestDefaultTaskQueueInput) GetDepth() uint32 {
+ if x != nil {
+ return x.Depth
+ }
+ return 0
+}
+
+type TestDefaultTaskQueueOutput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskQueues []string `protobuf:"bytes,1,rep,name=task_queues,json=taskQueues,proto3" json:"task_queues,omitempty"`
+}
+
+func (x *TestDefaultTaskQueueOutput) Reset() {
+ *x = TestDefaultTaskQueueOutput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_test_option_v1_option_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TestDefaultTaskQueueOutput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestDefaultTaskQueueOutput) ProtoMessage() {}
+
+func (x *TestDefaultTaskQueueOutput) ProtoReflect() protoreflect.Message {
+ mi := &file_test_option_v1_option_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TestDefaultTaskQueueOutput.ProtoReflect.Descriptor instead.
+func (*TestDefaultTaskQueueOutput) Descriptor() ([]byte, []int) {
+ return file_test_option_v1_option_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *TestDefaultTaskQueueOutput) GetTaskQueues() []string {
+ if x != nil {
+ return x.TaskQueues
+ }
+ return nil
+}
+
type WorkflowWithInputRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -174,7 +276,7 @@ type WorkflowWithInputRequest struct {
func (x *WorkflowWithInputRequest) Reset() {
*x = WorkflowWithInputRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_test_option_v1_option_proto_msgTypes[3]
+ mi := &file_test_option_v1_option_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -187,7 +289,7 @@ func (x *WorkflowWithInputRequest) String() string {
func (*WorkflowWithInputRequest) ProtoMessage() {}
func (x *WorkflowWithInputRequest) ProtoReflect() protoreflect.Message {
- mi := &file_test_option_v1_option_proto_msgTypes[3]
+ mi := &file_test_option_v1_option_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -200,7 +302,7 @@ func (x *WorkflowWithInputRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use WorkflowWithInputRequest.ProtoReflect.Descriptor instead.
func (*WorkflowWithInputRequest) Descriptor() ([]byte, []int) {
- return file_test_option_v1_option_proto_rawDescGZIP(), []int{3}
+ return file_test_option_v1_option_proto_rawDescGZIP(), []int{5}
}
func (x *WorkflowWithInputRequest) GetName() string {
@@ -210,6 +312,108 @@ func (x *WorkflowWithInputRequest) GetName() string {
return ""
}
+type TestParentTaskQueueInput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskQueues []string `protobuf:"bytes,1,rep,name=task_queues,json=taskQueues,proto3" json:"task_queues,omitempty"`
+ Depth uint32 `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
+}
+
+func (x *TestParentTaskQueueInput) Reset() {
+ *x = TestParentTaskQueueInput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_test_option_v1_option_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TestParentTaskQueueInput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestParentTaskQueueInput) ProtoMessage() {}
+
+func (x *TestParentTaskQueueInput) ProtoReflect() protoreflect.Message {
+ mi := &file_test_option_v1_option_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TestParentTaskQueueInput.ProtoReflect.Descriptor instead.
+func (*TestParentTaskQueueInput) Descriptor() ([]byte, []int) {
+ return file_test_option_v1_option_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *TestParentTaskQueueInput) GetTaskQueues() []string {
+ if x != nil {
+ return x.TaskQueues
+ }
+ return nil
+}
+
+func (x *TestParentTaskQueueInput) GetDepth() uint32 {
+ if x != nil {
+ return x.Depth
+ }
+ return 0
+}
+
+type TestParentTaskQueueOutput struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TaskQueues []string `protobuf:"bytes,1,rep,name=task_queues,json=taskQueues,proto3" json:"task_queues,omitempty"`
+}
+
+func (x *TestParentTaskQueueOutput) Reset() {
+ *x = TestParentTaskQueueOutput{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_test_option_v1_option_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TestParentTaskQueueOutput) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TestParentTaskQueueOutput) ProtoMessage() {}
+
+func (x *TestParentTaskQueueOutput) ProtoReflect() protoreflect.Message {
+ mi := &file_test_option_v1_option_proto_msgTypes[7]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use TestParentTaskQueueOutput.ProtoReflect.Descriptor instead.
+func (*TestParentTaskQueueOutput) Descriptor() ([]byte, []int) {
+ return file_test_option_v1_option_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *TestParentTaskQueueOutput) GetTaskQueues() []string {
+ if x != nil {
+ return x.TaskQueues
+ }
+ return nil
+}
+
var File_test_option_v1_option_proto protoreflect.FileDescriptor
var file_test_option_v1_option_proto_rawDesc = []byte{
@@ -228,58 +432,94 @@ var file_test_option_v1_option_proto_rawDesc = []byte{
0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x22, 0x2c, 0x0a, 0x16, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2e, 0x0a, 0x18, 0x57, 0x6f, 0x72,
- 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65,
- 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
- 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x32, 0xa8, 0x04, 0x0a, 0x04, 0x54, 0x65,
- 0x73, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x57,
- 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x28, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e,
- 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69,
- 0x74, 0x79, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
- 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x57, 0x69, 0x74, 0x68,
- 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x92,
- 0xc4, 0x03, 0x23, 0x0a, 0x09, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x76, 0x32, 0x12, 0x02,
- 0x08, 0x78, 0x1a, 0x02, 0x08, 0x0a, 0x22, 0x02, 0x08, 0x3c, 0x2a, 0x02, 0x08, 0x1e, 0x32, 0x04,
- 0x1a, 0x02, 0x08, 0x05, 0x40, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74,
- 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x26, 0x2e, 0x74, 0x65, 0x73,
- 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x44, 0xaa, 0xc4, 0x03, 0x40,
- 0x0a, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2d, 0x77, 0x69, 0x74, 0x68, 0x2d, 0x69, 0x6e,
- 0x70, 0x75, 0x74, 0x3a, 0x24, 0x7b, 0x21, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x6f, 0x72, 0x28,
- 0x74, 0x68, 0x72, 0x6f, 0x77, 0x28, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x73, 0x20, 0x72,
- 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x29, 0x29, 0x20, 0x7d, 0x18, 0x01, 0x38, 0x03,
- 0x12, 0xe0, 0x01, 0x0a, 0x11, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x57, 0x69, 0x74,
- 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x28, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70,
- 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77,
- 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
- 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x88, 0x01, 0x8a, 0xc4, 0x03, 0x83, 0x01,
- 0x1a, 0x11, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e,
- 0x70, 0x75, 0x74, 0x22, 0x03, 0x08, 0xd8, 0x04, 0x2a, 0x3c, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c,
- 0x6f, 0x77, 0x2d, 0x77, 0x69, 0x74, 0x68, 0x2d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x3a, 0x24, 0x7b,
- 0x21, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x6f, 0x72, 0x28, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x28,
- 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65,
- 0x64, 0x22, 0x29, 0x29, 0x20, 0x7d, 0x30, 0x02, 0x40, 0x03, 0x4a, 0x02, 0x20, 0x05, 0x52, 0x03,
- 0x08, 0xac, 0x02, 0x5a, 0x09, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x76, 0x32, 0x62, 0x02,
- 0x08, 0x0a, 0x68, 0x01, 0x7a, 0x0d, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x61, 0x6d,
- 0x65, 0x20, 0x0a, 0x1a, 0x0f, 0x8a, 0xc4, 0x03, 0x0b, 0x0a, 0x09, 0x6f, 0x70, 0x74, 0x69, 0x6f,
- 0x6e, 0x2d, 0x76, 0x31, 0x42, 0xc2, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65, 0x73,
- 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4f, 0x70, 0x74,
- 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68,
- 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x75, 0x64, 0x64, 0x65, 0x6e, 0x2f, 0x70,
- 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x74, 0x65, 0x6d,
- 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f, 0x6f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x76,
- 0x31, 0xa2, 0x02, 0x03, 0x54, 0x4f, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x2e, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x5c,
- 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x65, 0x73, 0x74,
- 0x5c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x54, 0x65, 0x73, 0x74, 0x3a, 0x3a, 0x4f,
- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x33,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x19, 0x54, 0x65, 0x73,
+ 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75,
+ 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71,
+ 0x75, 0x65, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x73,
+ 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22, 0x3d, 0x0a,
+ 0x1a, 0x54, 0x65, 0x73, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b,
+ 0x51, 0x75, 0x65, 0x75, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74,
+ 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x22, 0x2e, 0x0a, 0x18,
+ 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x51, 0x0a, 0x18,
+ 0x54, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75,
+ 0x65, 0x75, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x73, 0x6b,
+ 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x74,
+ 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70,
+ 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x22,
+ 0x3c, 0x0a, 0x19, 0x54, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73,
+ 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x71, 0x75, 0x65, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x0a, 0x74, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x73, 0x32, 0x9d, 0x05,
+ 0x0a, 0x04, 0x54, 0x65, 0x73, 0x74, 0x12, 0x91, 0x01, 0x0a, 0x11, 0x41, 0x63, 0x74, 0x69, 0x76,
+ 0x69, 0x74, 0x79, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x28, 0x2e, 0x74,
+ 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63,
+ 0x74, 0x69, 0x76, 0x69, 0x74, 0x79, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x76, 0x69, 0x74, 0x79,
+ 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x27, 0x92, 0xc4, 0x03, 0x23, 0x0a, 0x09, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2d,
+ 0x76, 0x32, 0x12, 0x02, 0x08, 0x78, 0x1a, 0x02, 0x08, 0x0a, 0x22, 0x02, 0x08, 0x3c, 0x2a, 0x02,
+ 0x08, 0x1e, 0x32, 0x04, 0x1a, 0x02, 0x08, 0x05, 0x40, 0x01, 0x12, 0x97, 0x01, 0x0a, 0x0f, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x26,
+ 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x44,
+ 0xaa, 0xc4, 0x03, 0x40, 0x0a, 0x3a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2d, 0x77, 0x69, 0x74,
+ 0x68, 0x2d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x3a, 0x24, 0x7b, 0x21, 0x20, 0x6e, 0x61, 0x6d, 0x65,
+ 0x2e, 0x6f, 0x72, 0x28, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x28, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x20,
+ 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x29, 0x29, 0x20, 0x7d,
+ 0x18, 0x01, 0x38, 0x03, 0x12, 0x73, 0x0a, 0x14, 0x54, 0x65, 0x73, 0x74, 0x44, 0x65, 0x66, 0x61,
+ 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x29, 0x2e, 0x74,
+ 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65,
+ 0x73, 0x74, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65,
+ 0x75, 0x65, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x2a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x44, 0x65, 0x66,
+ 0x61, 0x75, 0x6c, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4f, 0x75, 0x74,
+ 0x70, 0x75, 0x74, 0x22, 0x04, 0x8a, 0xc4, 0x03, 0x00, 0x12, 0xe0, 0x01, 0x0a, 0x11, 0x57, 0x6f,
+ 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12,
+ 0x28, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31,
+ 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70,
+ 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74,
+ 0x79, 0x22, 0x88, 0x01, 0x8a, 0xc4, 0x03, 0x83, 0x01, 0x1a, 0x11, 0x0a, 0x0f, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x57, 0x69, 0x74, 0x68, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x22, 0x03, 0x08, 0xd8,
+ 0x04, 0x2a, 0x3c, 0x77, 0x6f, 0x72, 0x6b, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x77, 0x69, 0x74, 0x68,
+ 0x2d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x3a, 0x24, 0x7b, 0x21, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e,
+ 0x6f, 0x72, 0x28, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x28, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69,
+ 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x22, 0x29, 0x29, 0x20, 0x7d, 0x30,
+ 0x02, 0x40, 0x03, 0x4a, 0x02, 0x20, 0x05, 0x52, 0x03, 0x08, 0xac, 0x02, 0x5a, 0x09, 0x6f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x76, 0x32, 0x62, 0x02, 0x08, 0x0a, 0x68, 0x01, 0x7a, 0x0d, 0x6e,
+ 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x0a, 0x1a, 0x0f, 0x8a, 0xc4,
+ 0x03, 0x0b, 0x0a, 0x09, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x76, 0x31, 0x32, 0xa5, 0x01,
+ 0x0a, 0x12, 0x55, 0x73, 0x65, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51,
+ 0x75, 0x65, 0x75, 0x65, 0x12, 0x70, 0x0a, 0x13, 0x54, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x65,
+ 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x12, 0x28, 0x2e, 0x74, 0x65,
+ 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73,
+ 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65,
+ 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x29, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x65, 0x73, 0x74, 0x50, 0x61, 0x72, 0x65, 0x6e,
+ 0x74, 0x54, 0x61, 0x73, 0x6b, 0x51, 0x75, 0x65, 0x75, 0x65, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74,
+ 0x22, 0x04, 0x8a, 0xc4, 0x03, 0x00, 0x1a, 0x1d, 0x8a, 0xc4, 0x03, 0x19, 0x0a, 0x15, 0x75, 0x73,
+ 0x65, 0x2d, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x61, 0x73, 0x6b, 0x2d, 0x71, 0x75,
+ 0x65, 0x75, 0x65, 0x20, 0x01, 0x42, 0xc2, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x74, 0x65,
+ 0x73, 0x74, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6c, 0x75, 0x64, 0x64, 0x65, 0x6e, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x74, 0x65,
+ 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x76, 0x31, 0xa2, 0x02, 0x03, 0x54, 0x4f, 0x58, 0xaa, 0x02, 0x0e, 0x54, 0x65, 0x73, 0x74, 0x2e,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x54, 0x65, 0x73, 0x74,
+ 0x5c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x54, 0x65, 0x73,
+ 0x74, 0x5c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x54, 0x65, 0x73, 0x74, 0x3a, 0x3a,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
}
var (
@@ -294,23 +534,31 @@ func file_test_option_v1_option_proto_rawDescGZIP() []byte {
return file_test_option_v1_option_proto_rawDescData
}
-var file_test_option_v1_option_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_test_option_v1_option_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
var file_test_option_v1_option_proto_goTypes = []any{
- (*ActivityWithInputRequest)(nil), // 0: test.option.v1.ActivityWithInputRequest
- (*ActivityWithInputResponse)(nil), // 1: test.option.v1.ActivityWithInputResponse
- (*UpdateWithInputRequest)(nil), // 2: test.option.v1.UpdateWithInputRequest
- (*WorkflowWithInputRequest)(nil), // 3: test.option.v1.WorkflowWithInputRequest
- (*emptypb.Empty)(nil), // 4: google.protobuf.Empty
+ (*ActivityWithInputRequest)(nil), // 0: test.option.v1.ActivityWithInputRequest
+ (*ActivityWithInputResponse)(nil), // 1: test.option.v1.ActivityWithInputResponse
+ (*UpdateWithInputRequest)(nil), // 2: test.option.v1.UpdateWithInputRequest
+ (*TestDefaultTaskQueueInput)(nil), // 3: test.option.v1.TestDefaultTaskQueueInput
+ (*TestDefaultTaskQueueOutput)(nil), // 4: test.option.v1.TestDefaultTaskQueueOutput
+ (*WorkflowWithInputRequest)(nil), // 5: test.option.v1.WorkflowWithInputRequest
+ (*TestParentTaskQueueInput)(nil), // 6: test.option.v1.TestParentTaskQueueInput
+ (*TestParentTaskQueueOutput)(nil), // 7: test.option.v1.TestParentTaskQueueOutput
+ (*emptypb.Empty)(nil), // 8: google.protobuf.Empty
}
var file_test_option_v1_option_proto_depIdxs = []int32{
0, // 0: test.option.v1.Test.ActivityWithInput:input_type -> test.option.v1.ActivityWithInputRequest
2, // 1: test.option.v1.Test.UpdateWithInput:input_type -> test.option.v1.UpdateWithInputRequest
- 3, // 2: test.option.v1.Test.WorkflowWithInput:input_type -> test.option.v1.WorkflowWithInputRequest
- 1, // 3: test.option.v1.Test.ActivityWithInput:output_type -> test.option.v1.ActivityWithInputResponse
- 4, // 4: test.option.v1.Test.UpdateWithInput:output_type -> google.protobuf.Empty
- 4, // 5: test.option.v1.Test.WorkflowWithInput:output_type -> google.protobuf.Empty
- 3, // [3:6] is the sub-list for method output_type
- 0, // [0:3] is the sub-list for method input_type
+ 3, // 2: test.option.v1.Test.TestDefaultTaskQueue:input_type -> test.option.v1.TestDefaultTaskQueueInput
+ 5, // 3: test.option.v1.Test.WorkflowWithInput:input_type -> test.option.v1.WorkflowWithInputRequest
+ 6, // 4: test.option.v1.UseParentTaskQueue.TestParentTaskQueue:input_type -> test.option.v1.TestParentTaskQueueInput
+ 1, // 5: test.option.v1.Test.ActivityWithInput:output_type -> test.option.v1.ActivityWithInputResponse
+ 8, // 6: test.option.v1.Test.UpdateWithInput:output_type -> google.protobuf.Empty
+ 4, // 7: test.option.v1.Test.TestDefaultTaskQueue:output_type -> test.option.v1.TestDefaultTaskQueueOutput
+ 8, // 8: test.option.v1.Test.WorkflowWithInput:output_type -> google.protobuf.Empty
+ 7, // 9: test.option.v1.UseParentTaskQueue.TestParentTaskQueue:output_type -> test.option.v1.TestParentTaskQueueOutput
+ 5, // [5:10] is the sub-list for method output_type
+ 0, // [0:5] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
@@ -359,6 +607,30 @@ func file_test_option_v1_option_proto_init() {
}
}
file_test_option_v1_option_proto_msgTypes[3].Exporter = func(v any, i int) any {
+ switch v := v.(*TestDefaultTaskQueueInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_test_option_v1_option_proto_msgTypes[4].Exporter = func(v any, i int) any {
+ switch v := v.(*TestDefaultTaskQueueOutput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_test_option_v1_option_proto_msgTypes[5].Exporter = func(v any, i int) any {
switch v := v.(*WorkflowWithInputRequest); i {
case 0:
return &v.state
@@ -370,6 +642,30 @@ func file_test_option_v1_option_proto_init() {
return nil
}
}
+ file_test_option_v1_option_proto_msgTypes[6].Exporter = func(v any, i int) any {
+ switch v := v.(*TestParentTaskQueueInput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_test_option_v1_option_proto_msgTypes[7].Exporter = func(v any, i int) any {
+ switch v := v.(*TestParentTaskQueueOutput); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
}
type x struct{}
out := protoimpl.TypeBuilder{
@@ -377,9 +673,9 @@ func file_test_option_v1_option_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_test_option_v1_option_proto_rawDesc,
NumEnums: 0,
- NumMessages: 4,
+ NumMessages: 8,
NumExtensions: 0,
- NumServices: 1,
+ NumServices: 2,
},
GoTypes: file_test_option_v1_option_proto_goTypes,
DependencyIndexes: file_test_option_v1_option_proto_depIdxs,
diff --git a/gen/test/option/v1/option_temporal.pb.go b/gen/test/option/v1/option_temporal.pb.go
index 13236277..1a072988 100644
--- a/gen/test/option/v1/option_temporal.pb.go
+++ b/gen/test/option/v1/option_temporal.pb.go
@@ -1,15 +1,17 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: test/option/v1/option.proto
package optionv1
import (
+ "bytes"
"context"
+ "encoding/json"
"errors"
"fmt"
expression "github.com/cludden/protoc-gen-go-temporal/pkg/expression"
@@ -40,7 +42,8 @@ const TestTaskQueue = "option-v1"
// test.option.v1.Test workflow names
const (
- WorkflowWithInputWorkflowName = "test.option.v1.Test.WorkflowWithInput"
+ TestDefaultTaskQueueWorkflowName = "test.option.v1.Test.TestDefaultTaskQueue"
+ WorkflowWithInputWorkflowName = "test.option.v1.Test.WorkflowWithInput"
)
// test.option.v1.Test workflow id expressions
@@ -70,6 +73,15 @@ var (
// TestClient describes a client for a(n) test.option.v1.Test worker
type TestClient interface {
+ // TestDefaultTaskQueue executes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow and blocks until error or response received
+ TestDefaultTaskQueue(ctx context.Context, req *TestDefaultTaskQueueInput, opts ...*TestDefaultTaskQueueOptions) (*TestDefaultTaskQueueOutput, error)
+
+ // TestDefaultTaskQueueAsync starts a(n) test.option.v1.Test.TestDefaultTaskQueue workflow and returns a handle to the workflow run
+ TestDefaultTaskQueueAsync(ctx context.Context, req *TestDefaultTaskQueueInput, opts ...*TestDefaultTaskQueueOptions) (TestDefaultTaskQueueRun, error)
+
+ // GetTestDefaultTaskQueue retrieves a handle to an existing test.option.v1.Test.TestDefaultTaskQueue workflow execution
+ GetTestDefaultTaskQueue(ctx context.Context, workflowID string, runID string) TestDefaultTaskQueueRun
+
// WorkflowWithInput executes a(n) test.option.v1.Test.WorkflowWithInput workflow and blocks until error or response received
WorkflowWithInput(ctx context.Context, req *WorkflowWithInputRequest, opts ...*WorkflowWithInputOptions) error
@@ -160,6 +172,48 @@ func (opts *testClientOptions) getLogger() *slog.Logger {
return slog.Default()
}
+// test.option.v1.Test.TestDefaultTaskQueue executes a test.option.v1.Test.TestDefaultTaskQueue workflow and blocks until error or response received
+func (c *testClient) TestDefaultTaskQueue(ctx context.Context, req *TestDefaultTaskQueueInput, options ...*TestDefaultTaskQueueOptions) (*TestDefaultTaskQueueOutput, error) {
+ run, err := c.TestDefaultTaskQueueAsync(ctx, req, options...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// TestDefaultTaskQueueAsync starts a(n) test.option.v1.Test.TestDefaultTaskQueue workflow and returns a handle to the workflow run
+func (c *testClient) TestDefaultTaskQueueAsync(ctx context.Context, req *TestDefaultTaskQueueInput, options ...*TestDefaultTaskQueueOptions) (TestDefaultTaskQueueRun, error) {
+ var o *TestDefaultTaskQueueOptions
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewTestDefaultTaskQueueOptions()
+ }
+ opts, err := o.Build(req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing client.StartWorkflowOptions: %w", err)
+ }
+ run, err := c.client.ExecuteWorkflow(ctx, opts, TestDefaultTaskQueueWorkflowName, req)
+ if err != nil {
+ return nil, err
+ }
+ if run == nil {
+ return nil, errors.New("execute workflow returned nil run")
+ }
+ return &testDefaultTaskQueueRun{
+ client: c,
+ run: run,
+ }, nil
+}
+
+// GetTestDefaultTaskQueue fetches an existing test.option.v1.Test.TestDefaultTaskQueue execution
+func (c *testClient) GetTestDefaultTaskQueue(ctx context.Context, workflowID string, runID string) TestDefaultTaskQueueRun {
+ return &testDefaultTaskQueueRun{
+ client: c,
+ run: c.client.GetWorkflow(ctx, workflowID, runID),
+ }
+}
+
// test.option.v1.Test.WorkflowWithInput executes a test.option.v1.Test.WorkflowWithInput workflow and blocks until error or response received
func (c *testClient) WorkflowWithInput(ctx context.Context, req *WorkflowWithInputRequest, options ...*WorkflowWithInputOptions) error {
run, err := c.WorkflowWithInputAsync(ctx, req, options...)
@@ -262,6 +316,171 @@ func (c *testClient) GetUpdateWithInput(ctx context.Context, req client.GetWorkf
}, nil
}
+// TestDefaultTaskQueueOptions provides configuration for a test.option.v1.Test.TestDefaultTaskQueue workflow operation
+type TestDefaultTaskQueueOptions struct {
+ options client.StartWorkflowOptions
+ executionTimeout *time.Duration
+ id *string
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
+ retryPolicy *temporal.RetryPolicy
+ runTimeout *time.Duration
+ searchAttributes map[string]any
+ taskQueue *string
+ taskTimeout *time.Duration
+}
+
+// NewTestDefaultTaskQueueOptions initializes a new TestDefaultTaskQueueOptions value
+func NewTestDefaultTaskQueueOptions() *TestDefaultTaskQueueOptions {
+ return &TestDefaultTaskQueueOptions{}
+}
+
+// Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
+func (o *TestDefaultTaskQueueOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error) {
+ opts := o.options
+ if v := o.id; v != nil {
+ opts.ID = *v
+ }
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = v
+ }
+ if v := o.taskQueue; v != nil {
+ opts.TaskQueue = *v
+ } else if opts.TaskQueue == "" {
+ opts.TaskQueue = TestTaskQueue
+ }
+ if v := o.retryPolicy; v != nil {
+ opts.RetryPolicy = v
+ }
+ if v := o.searchAttributes; v != nil {
+ opts.SearchAttributes = o.searchAttributes
+ }
+ if v := o.executionTimeout; v != nil {
+ opts.WorkflowExecutionTimeout = *v
+ }
+ if v := o.runTimeout; v != nil {
+ opts.WorkflowRunTimeout = *v
+ }
+ if v := o.taskTimeout; v != nil {
+ opts.WorkflowTaskTimeout = *v
+ }
+ return opts, nil
+}
+
+// WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
+func (o *TestDefaultTaskQueueOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *TestDefaultTaskQueueOptions {
+ o.options = options
+ return o
+}
+
+// WithExecutionTimeout sets the WorkflowExecutionTimeout value
+func (o *TestDefaultTaskQueueOptions) WithExecutionTimeout(d time.Duration) *TestDefaultTaskQueueOptions {
+ o.executionTimeout = &d
+ return o
+}
+
+// WithID sets the ID value
+func (o *TestDefaultTaskQueueOptions) WithID(id string) *TestDefaultTaskQueueOptions {
+ o.id = &id
+ return o
+}
+
+// WithIDReusePolicy sets the WorkflowIDReusePolicy value
+func (o *TestDefaultTaskQueueOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *TestDefaultTaskQueueOptions {
+ o.idReusePolicy = policy
+ return o
+}
+
+// WithRetryPolicy sets the RetryPolicy value
+func (o *TestDefaultTaskQueueOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *TestDefaultTaskQueueOptions {
+ o.retryPolicy = policy
+ return o
+}
+
+// WithRunTimeout sets the WorkflowRunTimeout value
+func (o *TestDefaultTaskQueueOptions) WithRunTimeout(d time.Duration) *TestDefaultTaskQueueOptions {
+ o.runTimeout = &d
+ return o
+}
+
+// WithSearchAttributes sets the SearchAttributes value
+func (o *TestDefaultTaskQueueOptions) WithSearchAttributes(sa map[string]any) *TestDefaultTaskQueueOptions {
+ o.searchAttributes = sa
+ return o
+}
+
+// WithTaskTimeout sets the WorkflowTaskTimeout value
+func (o *TestDefaultTaskQueueOptions) WithTaskTimeout(d time.Duration) *TestDefaultTaskQueueOptions {
+ o.taskTimeout = &d
+ return o
+}
+
+// WithTaskQueue sets the TaskQueue value
+func (o *TestDefaultTaskQueueOptions) WithTaskQueue(tq string) *TestDefaultTaskQueueOptions {
+ o.taskQueue = &tq
+ return o
+}
+
+// TestDefaultTaskQueueRun describes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow run
+type TestDefaultTaskQueueRun interface {
+ // ID returns the workflow ID
+ ID() string
+
+ // RunID returns the workflow instance ID
+ RunID() string
+
+ // Run returns the inner client.WorkflowRun
+ Run() client.WorkflowRun
+
+ // Get blocks until the workflow is complete and returns the result
+ Get(ctx context.Context) (*TestDefaultTaskQueueOutput, error)
+
+ // Cancel requests cancellation of a workflow in execution, returning an error if applicable
+ Cancel(ctx context.Context) error
+
+ // Terminate terminates a workflow in execution, returning an error if applicable
+ Terminate(ctx context.Context, reason string, details ...interface{}) error
+}
+
+// testDefaultTaskQueueRun provides an internal implementation of a(n) TestDefaultTaskQueueRunRun
+type testDefaultTaskQueueRun struct {
+ client *testClient
+ run client.WorkflowRun
+}
+
+// ID returns the workflow ID
+func (r *testDefaultTaskQueueRun) ID() string {
+ return r.run.GetID()
+}
+
+// Run returns the inner client.WorkflowRun
+func (r *testDefaultTaskQueueRun) Run() client.WorkflowRun {
+ return r.run
+}
+
+// RunID returns the execution ID
+func (r *testDefaultTaskQueueRun) RunID() string {
+ return r.run.GetRunID()
+}
+
+// Cancel requests cancellation of a workflow in execution, returning an error if applicable
+func (r *testDefaultTaskQueueRun) Cancel(ctx context.Context) error {
+ return r.client.CancelWorkflow(ctx, r.ID(), r.RunID())
+}
+
+// Get blocks until the workflow is complete, returning the result if applicable
+func (r *testDefaultTaskQueueRun) Get(ctx context.Context) (*TestDefaultTaskQueueOutput, error) {
+ var resp TestDefaultTaskQueueOutput
+ if err := r.run.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Terminate terminates a workflow in execution, returning an error if applicable
+func (r *testDefaultTaskQueueRun) Terminate(ctx context.Context, reason string, details ...interface{}) error {
+ return r.client.TerminateWorkflow(ctx, r.ID(), r.RunID(), reason, details...)
+}
+
// WorkflowWithInputOptions provides configuration for a test.option.v1.Test.WorkflowWithInput workflow operation
type WorkflowWithInputOptions struct {
options client.StartWorkflowOptions
@@ -597,6 +816,8 @@ func (o *UpdateWithInputOptions) WithWaitPolicy(policy client.WorkflowUpdateStag
// Reference to generated workflow functions
var (
+ // TestDefaultTaskQueueFunction implements a "test.option.v1.Test.TestDefaultTaskQueue" workflow
+ TestDefaultTaskQueueFunction func(workflow.Context, *TestDefaultTaskQueueInput) (*TestDefaultTaskQueueOutput, error)
// WorkflowWithInputFunction implements a "test.option.v1.Test.WorkflowWithInput" workflow
WorkflowWithInputFunction func(workflow.Context, *WorkflowWithInputRequest) error
)
@@ -605,6 +826,8 @@ var (
type (
// TestWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows
TestWorkflowFunctions interface {
+ // TestDefaultTaskQueue executes a "test.option.v1.Test.TestDefaultTaskQueue" workflow inline
+ TestDefaultTaskQueue(workflow.Context, *TestDefaultTaskQueueInput) (*TestDefaultTaskQueueOutput, error)
// WorkflowWithInput executes a "test.option.v1.Test.WorkflowWithInput" workflow inline
WorkflowWithInput(workflow.Context, *WorkflowWithInputRequest) error
}
@@ -616,6 +839,14 @@ func NewTestWorkflowFunctions() TestWorkflowFunctions {
return &testWorkflowFunctions{}
}
+// TestDefaultTaskQueue executes a "test.option.v1.Test.TestDefaultTaskQueue" workflow inline
+func (f *testWorkflowFunctions) TestDefaultTaskQueue(ctx workflow.Context, req *TestDefaultTaskQueueInput) (*TestDefaultTaskQueueOutput, error) {
+ if TestDefaultTaskQueueFunction == nil {
+ return nil, errors.New("TestDefaultTaskQueue requires workflow registration via RegisterTestWorkflows or RegisterTestDefaultTaskQueueWorkflow")
+ }
+ return TestDefaultTaskQueueFunction(ctx, req)
+}
+
// WorkflowWithInput executes a "test.option.v1.Test.WorkflowWithInput" workflow inline
func (f *testWorkflowFunctions) WorkflowWithInput(ctx workflow.Context, req *WorkflowWithInputRequest) error {
if WorkflowWithInputFunction == nil {
@@ -626,89 +857,82 @@ func (f *testWorkflowFunctions) WorkflowWithInput(ctx workflow.Context, req *Wor
// TestWorkflows provides methods for initializing new test.option.v1.Test workflow values
type TestWorkflows interface {
+ // TestDefaultTaskQueue initializes a new a(n) TestDefaultTaskQueueWorkflow implementation
+ TestDefaultTaskQueue(ctx workflow.Context, input *TestDefaultTaskQueueWorkflowInput) (TestDefaultTaskQueueWorkflow, error)
+
// WorkflowWithInput initializes a new a(n) WorkflowWithInputWorkflow implementation
WorkflowWithInput(ctx workflow.Context, input *WorkflowWithInputWorkflowInput) (WorkflowWithInputWorkflow, error)
}
// RegisterTestWorkflows registers test.option.v1.Test workflows with the given worker
func RegisterTestWorkflows(r worker.WorkflowRegistry, workflows TestWorkflows) {
+ RegisterTestDefaultTaskQueueWorkflow(r, workflows.TestDefaultTaskQueue)
RegisterWorkflowWithInputWorkflow(r, workflows.WorkflowWithInput)
}
-// RegisterWorkflowWithInputWorkflow registers a test.option.v1.Test.WorkflowWithInput workflow with the given worker
-func RegisterWorkflowWithInputWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *WorkflowWithInputWorkflowInput) (WorkflowWithInputWorkflow, error)) {
- WorkflowWithInputFunction = buildWorkflowWithInput(wf)
- r.RegisterWorkflowWithOptions(WorkflowWithInputFunction, workflow.RegisterOptions{Name: WorkflowWithInputWorkflowName})
+// RegisterTestDefaultTaskQueueWorkflow registers a test.option.v1.Test.TestDefaultTaskQueue workflow with the given worker
+func RegisterTestDefaultTaskQueueWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *TestDefaultTaskQueueWorkflowInput) (TestDefaultTaskQueueWorkflow, error)) {
+ TestDefaultTaskQueueFunction = buildTestDefaultTaskQueue(wf)
+ r.RegisterWorkflowWithOptions(TestDefaultTaskQueueFunction, workflow.RegisterOptions{Name: TestDefaultTaskQueueWorkflowName})
}
-// buildWorkflowWithInput converts a WorkflowWithInput workflow struct into a valid workflow function
-func buildWorkflowWithInput(ctor func(workflow.Context, *WorkflowWithInputWorkflowInput) (WorkflowWithInputWorkflow, error)) func(workflow.Context, *WorkflowWithInputRequest) error {
- return func(ctx workflow.Context, req *WorkflowWithInputRequest) error {
- input := &WorkflowWithInputWorkflowInput{
+// buildTestDefaultTaskQueue converts a TestDefaultTaskQueue workflow struct into a valid workflow function
+func buildTestDefaultTaskQueue(ctor func(workflow.Context, *TestDefaultTaskQueueWorkflowInput) (TestDefaultTaskQueueWorkflow, error)) func(workflow.Context, *TestDefaultTaskQueueInput) (*TestDefaultTaskQueueOutput, error) {
+ return func(ctx workflow.Context, req *TestDefaultTaskQueueInput) (*TestDefaultTaskQueueOutput, error) {
+ input := &TestDefaultTaskQueueWorkflowInput{
Req: req,
}
wf, err := ctor(ctx, input)
if err != nil {
- return err
+ return nil, err
}
if initializable, ok := wf.(helpers.Initializable); ok {
if err := initializable.Initialize(ctx); err != nil {
- return err
- }
- }
- {
- opts := workflow.UpdateHandlerOptions{}
- if err := workflow.SetUpdateHandlerWithOptions(ctx, UpdateWithInputUpdateName, wf.UpdateWithInput, opts); err != nil {
- return err
+ return nil, err
}
}
return wf.Execute(ctx)
}
}
-// WorkflowWithInputWorkflowInput describes the input to a(n) test.option.v1.Test.WorkflowWithInput workflow constructor
-type WorkflowWithInputWorkflowInput struct {
- Req *WorkflowWithInputRequest
+// TestDefaultTaskQueueWorkflowInput describes the input to a(n) test.option.v1.Test.TestDefaultTaskQueue workflow constructor
+type TestDefaultTaskQueueWorkflowInput struct {
+ Req *TestDefaultTaskQueueInput
}
-// WorkflowWithInputWorkflow describes a(n) test.option.v1.Test.WorkflowWithInput workflow implementation
-//
-// workflow details: (id: "workflow-with-input:${! name.or(throw("name is required")) }")
-type WorkflowWithInputWorkflow interface {
- // Execute defines the entrypoint to a(n) test.option.v1.Test.WorkflowWithInput workflow
- Execute(ctx workflow.Context) error
-
- // test.option.v1.Test.UpdateWithInput implements a(n) test.option.v1.Test.UpdateWithInput update handler
- UpdateWithInput(workflow.Context, *UpdateWithInputRequest) error
+// TestDefaultTaskQueueWorkflow describes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow implementation
+type TestDefaultTaskQueueWorkflow interface {
+ // Execute defines the entrypoint to a(n) test.option.v1.Test.TestDefaultTaskQueue workflow
+ Execute(ctx workflow.Context) (*TestDefaultTaskQueueOutput, error)
}
-// WorkflowWithInputChild executes a child test.option.v1.Test.WorkflowWithInput workflow and blocks until error or response received
-func WorkflowWithInputChild(ctx workflow.Context, req *WorkflowWithInputRequest, options ...*WorkflowWithInputChildOptions) error {
- childRun, err := WorkflowWithInputChildAsync(ctx, req, options...)
+// TestDefaultTaskQueueChild executes a child test.option.v1.Test.TestDefaultTaskQueue workflow and blocks until error or response received
+func TestDefaultTaskQueueChild(ctx workflow.Context, req *TestDefaultTaskQueueInput, options ...*TestDefaultTaskQueueChildOptions) (*TestDefaultTaskQueueOutput, error) {
+ childRun, err := TestDefaultTaskQueueChildAsync(ctx, req, options...)
if err != nil {
- return err
+ return nil, err
}
return childRun.Get(ctx)
}
-// WorkflowWithInputChildAsync starts a child test.option.v1.Test.WorkflowWithInput workflow and returns a handle to the child workflow run
-func WorkflowWithInputChildAsync(ctx workflow.Context, req *WorkflowWithInputRequest, options ...*WorkflowWithInputChildOptions) (*WorkflowWithInputChildRun, error) {
- var o *WorkflowWithInputChildOptions
+// TestDefaultTaskQueueChildAsync starts a child test.option.v1.Test.TestDefaultTaskQueue workflow and returns a handle to the child workflow run
+func TestDefaultTaskQueueChildAsync(ctx workflow.Context, req *TestDefaultTaskQueueInput, options ...*TestDefaultTaskQueueChildOptions) (*TestDefaultTaskQueueChildRun, error) {
+ var o *TestDefaultTaskQueueChildOptions
if len(options) > 0 && options[0] != nil {
o = options[0]
} else {
- o = NewWorkflowWithInputChildOptions()
+ o = NewTestDefaultTaskQueueChildOptions()
}
opts, err := o.Build(ctx, req.ProtoReflect())
if err != nil {
return nil, fmt.Errorf("error initializing workflow.ChildWorkflowOptions: %w", err)
}
ctx = workflow.WithChildOptions(ctx, opts)
- return &WorkflowWithInputChildRun{Future: workflow.ExecuteChildWorkflow(ctx, WorkflowWithInputWorkflowName, req)}, nil
+ return &TestDefaultTaskQueueChildRun{Future: workflow.ExecuteChildWorkflow(ctx, TestDefaultTaskQueueWorkflowName, req)}, nil
}
-// WorkflowWithInputChildOptions provides configuration for a child test.option.v1.Test.WorkflowWithInput workflow operation
-type WorkflowWithInputChildOptions struct {
+// TestDefaultTaskQueueChildOptions provides configuration for a child test.option.v1.Test.TestDefaultTaskQueue workflow operation
+type TestDefaultTaskQueueChildOptions struct {
options workflow.ChildWorkflowOptions
executionTimeout *time.Duration
id *string
@@ -722,68 +946,305 @@ type WorkflowWithInputChildOptions struct {
waitForCancellation *bool
}
-// NewWorkflowWithInputChildOptions initializes a new WorkflowWithInputChildOptions value
-func NewWorkflowWithInputChildOptions() *WorkflowWithInputChildOptions {
- return &WorkflowWithInputChildOptions{}
+// NewTestDefaultTaskQueueChildOptions initializes a new TestDefaultTaskQueueChildOptions value
+func NewTestDefaultTaskQueueChildOptions() *TestDefaultTaskQueueChildOptions {
+ return &TestDefaultTaskQueueChildOptions{}
}
// Build initializes a new go.temporal.io/sdk/workflow.ChildWorkflowOptions value with defaults and overrides applied
-func (o *WorkflowWithInputChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error) {
+func (o *TestDefaultTaskQueueChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error) {
opts := o.options
if v := o.id; v != nil {
opts.WorkflowID = *v
- } else if opts.WorkflowID == "" {
- // wrap expression evaluation in local activity
- // more info: https://cludden.github.io/protoc-gen-go-temporal/docs/guides/patches#pv_64-expression-evaluation-local-activity
- if workflow.GetVersion(ctx, "cludden_protoc-gen-go-temporal_64_expression-evaluation-local-activity", workflow.DefaultVersion, 1) == 1 {
- lao := workflow.GetLocalActivityOptions(ctx)
- lao.ScheduleToCloseTimeout = time.Second * 10
- if err := workflow.ExecuteLocalActivity(workflow.WithLocalActivityOptions(ctx, lao), func(ctx context.Context) (string, error) {
- id, err := expression.EvalExpression(WorkflowWithInputIdexpression, req)
- if err != nil {
- return "", fmt.Errorf("error evaluating id expression for %q workflow: %w", WorkflowWithInputWorkflowName, err)
- }
- return id, nil
- }).Get(ctx, &opts.WorkflowID); err != nil {
- return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", WorkflowWithInputWorkflowName, err)
- }
- } else {
- id, err := expression.EvalExpression(WorkflowWithInputIdexpression, req)
- if err != nil {
- return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", WorkflowWithInputWorkflowName, err)
- }
- opts.WorkflowID = id
- }
}
if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
opts.WorkflowIDReusePolicy = v
- } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
- opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY
}
if v := o.taskQueue; v != nil {
opts.TaskQueue = *v
} else if opts.TaskQueue == "" {
- opts.TaskQueue = "option-v2"
+ opts.TaskQueue = TestTaskQueue
}
if v := o.retryPolicy; v != nil {
opts.RetryPolicy = v
- } else if opts.RetryPolicy == nil {
- opts.RetryPolicy = &temporal.RetryPolicy{
- MaximumAttempts: int32(5),
- }
}
if v := o.searchAttributes; v != nil {
opts.SearchAttributes = o.searchAttributes
- } else if opts.SearchAttributes == nil {
- // wrap expression evaluation in local activity
- // more info: https://cludden.github.io/protoc-gen-go-temporal/docs/guides/patches#pv_64-expression-evaluation-local-activity
- if workflow.GetVersion(ctx, "cludden_protoc-gen-go-temporal_64_expression-evaluation-local-activity", workflow.DefaultVersion, 1) == 1 {
- lao := workflow.GetLocalActivityOptions(ctx)
- lao.ScheduleToCloseTimeout = time.Second * 10
- if err := workflow.ExecuteLocalActivity(workflow.WithLocalActivityOptions(ctx, lao), func(ctx context.Context) (map[string]any, error) {
- structured, err := expression.ToStructured(req)
- if err != nil {
- return nil, fmt.Errorf("error serializing input for \"WorkflowWithInput\" search attribute mapping: %v", err)
+ }
+ if v := o.executionTimeout; v != nil {
+ opts.WorkflowExecutionTimeout = *v
+ }
+ if v := o.runTimeout; v != nil {
+ opts.WorkflowRunTimeout = *v
+ }
+ if v := o.taskTimeout; v != nil {
+ opts.WorkflowTaskTimeout = *v
+ }
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ opts.ParentClosePolicy = v
+ }
+ if v := o.waitForCancellation; v != nil {
+ opts.WaitForCancellation = *v
+ }
+ return opts, nil
+}
+
+// WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
+func (o *TestDefaultTaskQueueChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *TestDefaultTaskQueueChildOptions {
+ o.options = options
+ return o
+}
+
+// WithExecutionTimeout sets the WorkflowExecutionTimeout value
+func (o *TestDefaultTaskQueueChildOptions) WithExecutionTimeout(d time.Duration) *TestDefaultTaskQueueChildOptions {
+ o.executionTimeout = &d
+ return o
+}
+
+// WithID sets the WorkflowID value
+func (o *TestDefaultTaskQueueChildOptions) WithID(id string) *TestDefaultTaskQueueChildOptions {
+ o.id = &id
+ return o
+}
+
+// WithIDReusePolicy sets the WorkflowIDReusePolicy value
+func (o *TestDefaultTaskQueueChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *TestDefaultTaskQueueChildOptions {
+ o.idReusePolicy = policy
+ return o
+}
+
+// WithParentClosePolicy sets the WorkflowIDReusePolicy value
+func (o *TestDefaultTaskQueueChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *TestDefaultTaskQueueChildOptions {
+ o.parentClosePolicy = policy
+ return o
+}
+
+// WithRetryPolicy sets the RetryPolicy value
+func (o *TestDefaultTaskQueueChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *TestDefaultTaskQueueChildOptions {
+ o.retryPolicy = policy
+ return o
+}
+
+// WithRunTimeout sets the WorkflowRunTimeout value
+func (o *TestDefaultTaskQueueChildOptions) WithRunTimeout(d time.Duration) *TestDefaultTaskQueueChildOptions {
+ o.runTimeout = &d
+ return o
+}
+
+// WithSearchAttributes sets the SearchAttributes value
+func (o *TestDefaultTaskQueueChildOptions) WithSearchAttributes(sa map[string]any) *TestDefaultTaskQueueChildOptions {
+ o.searchAttributes = sa
+ return o
+}
+
+// WithTaskTimeout sets the WorkflowTaskTimeout value
+func (o *TestDefaultTaskQueueChildOptions) WithTaskTimeout(d time.Duration) *TestDefaultTaskQueueChildOptions {
+ o.taskTimeout = &d
+ return o
+}
+
+// WithTaskQueue sets the TaskQueue value
+func (o *TestDefaultTaskQueueChildOptions) WithTaskQueue(tq string) *TestDefaultTaskQueueChildOptions {
+ o.taskQueue = &tq
+ return o
+}
+
+// WithWaitForCancellation sets the WaitForCancellation value
+func (o *TestDefaultTaskQueueChildOptions) WithWaitForCancellation(wait bool) *TestDefaultTaskQueueChildOptions {
+ o.waitForCancellation = &wait
+ return o
+}
+
+// TestDefaultTaskQueueChildRun describes a child TestDefaultTaskQueue workflow run
+type TestDefaultTaskQueueChildRun struct {
+ Future workflow.ChildWorkflowFuture
+}
+
+// Get blocks until the workflow is completed, returning the response value
+func (r *TestDefaultTaskQueueChildRun) Get(ctx workflow.Context) (*TestDefaultTaskQueueOutput, error) {
+ var resp TestDefaultTaskQueueOutput
+ if err := r.Future.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Select adds this completion to the selector. Callback can be nil.
+func (r *TestDefaultTaskQueueChildRun) Select(sel workflow.Selector, fn func(*TestDefaultTaskQueueChildRun)) workflow.Selector {
+ return sel.AddFuture(r.Future, func(workflow.Future) {
+ if fn != nil {
+ fn(r)
+ }
+ })
+}
+
+// SelectStart adds waiting for start to the selector. Callback can be nil.
+func (r *TestDefaultTaskQueueChildRun) SelectStart(sel workflow.Selector, fn func(*TestDefaultTaskQueueChildRun)) workflow.Selector {
+ return sel.AddFuture(r.Future.GetChildWorkflowExecution(), func(workflow.Future) {
+ if fn != nil {
+ fn(r)
+ }
+ })
+}
+
+// WaitStart waits for the child workflow to start
+func (r *TestDefaultTaskQueueChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error) {
+ var exec workflow.Execution
+ if err := r.Future.GetChildWorkflowExecution().Get(ctx, &exec); err != nil {
+ return nil, err
+ }
+ return &exec, nil
+}
+
+// RegisterWorkflowWithInputWorkflow registers a test.option.v1.Test.WorkflowWithInput workflow with the given worker
+func RegisterWorkflowWithInputWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *WorkflowWithInputWorkflowInput) (WorkflowWithInputWorkflow, error)) {
+ WorkflowWithInputFunction = buildWorkflowWithInput(wf)
+ r.RegisterWorkflowWithOptions(WorkflowWithInputFunction, workflow.RegisterOptions{Name: WorkflowWithInputWorkflowName})
+}
+
+// buildWorkflowWithInput converts a WorkflowWithInput workflow struct into a valid workflow function
+func buildWorkflowWithInput(ctor func(workflow.Context, *WorkflowWithInputWorkflowInput) (WorkflowWithInputWorkflow, error)) func(workflow.Context, *WorkflowWithInputRequest) error {
+ return func(ctx workflow.Context, req *WorkflowWithInputRequest) error {
+ input := &WorkflowWithInputWorkflowInput{
+ Req: req,
+ }
+ wf, err := ctor(ctx, input)
+ if err != nil {
+ return err
+ }
+ if initializable, ok := wf.(helpers.Initializable); ok {
+ if err := initializable.Initialize(ctx); err != nil {
+ return err
+ }
+ }
+ {
+ opts := workflow.UpdateHandlerOptions{}
+ if err := workflow.SetUpdateHandlerWithOptions(ctx, UpdateWithInputUpdateName, wf.UpdateWithInput, opts); err != nil {
+ return err
+ }
+ }
+ return wf.Execute(ctx)
+ }
+}
+
+// WorkflowWithInputWorkflowInput describes the input to a(n) test.option.v1.Test.WorkflowWithInput workflow constructor
+type WorkflowWithInputWorkflowInput struct {
+ Req *WorkflowWithInputRequest
+}
+
+// WorkflowWithInputWorkflow describes a(n) test.option.v1.Test.WorkflowWithInput workflow implementation
+//
+// workflow details: (id: "workflow-with-input:${! name.or(throw("name is required")) }")
+type WorkflowWithInputWorkflow interface {
+ // Execute defines the entrypoint to a(n) test.option.v1.Test.WorkflowWithInput workflow
+ Execute(ctx workflow.Context) error
+
+ // test.option.v1.Test.UpdateWithInput implements a(n) test.option.v1.Test.UpdateWithInput update handler
+ UpdateWithInput(workflow.Context, *UpdateWithInputRequest) error
+}
+
+// WorkflowWithInputChild executes a child test.option.v1.Test.WorkflowWithInput workflow and blocks until error or response received
+func WorkflowWithInputChild(ctx workflow.Context, req *WorkflowWithInputRequest, options ...*WorkflowWithInputChildOptions) error {
+ childRun, err := WorkflowWithInputChildAsync(ctx, req, options...)
+ if err != nil {
+ return err
+ }
+ return childRun.Get(ctx)
+}
+
+// WorkflowWithInputChildAsync starts a child test.option.v1.Test.WorkflowWithInput workflow and returns a handle to the child workflow run
+func WorkflowWithInputChildAsync(ctx workflow.Context, req *WorkflowWithInputRequest, options ...*WorkflowWithInputChildOptions) (*WorkflowWithInputChildRun, error) {
+ var o *WorkflowWithInputChildOptions
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewWorkflowWithInputChildOptions()
+ }
+ opts, err := o.Build(ctx, req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing workflow.ChildWorkflowOptions: %w", err)
+ }
+ ctx = workflow.WithChildOptions(ctx, opts)
+ return &WorkflowWithInputChildRun{Future: workflow.ExecuteChildWorkflow(ctx, WorkflowWithInputWorkflowName, req)}, nil
+}
+
+// WorkflowWithInputChildOptions provides configuration for a child test.option.v1.Test.WorkflowWithInput workflow operation
+type WorkflowWithInputChildOptions struct {
+ options workflow.ChildWorkflowOptions
+ executionTimeout *time.Duration
+ id *string
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
+ retryPolicy *temporal.RetryPolicy
+ runTimeout *time.Duration
+ searchAttributes map[string]any
+ taskQueue *string
+ taskTimeout *time.Duration
+ parentClosePolicy enumsv1.ParentClosePolicy
+ waitForCancellation *bool
+}
+
+// NewWorkflowWithInputChildOptions initializes a new WorkflowWithInputChildOptions value
+func NewWorkflowWithInputChildOptions() *WorkflowWithInputChildOptions {
+ return &WorkflowWithInputChildOptions{}
+}
+
+// Build initializes a new go.temporal.io/sdk/workflow.ChildWorkflowOptions value with defaults and overrides applied
+func (o *WorkflowWithInputChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error) {
+ opts := o.options
+ if v := o.id; v != nil {
+ opts.WorkflowID = *v
+ } else if opts.WorkflowID == "" {
+ // wrap expression evaluation in local activity
+ // more info: https://cludden.github.io/protoc-gen-go-temporal/docs/guides/patches#pv_64-expression-evaluation-local-activity
+ if workflow.GetVersion(ctx, "cludden_protoc-gen-go-temporal_64_expression-evaluation-local-activity", workflow.DefaultVersion, 1) == 1 {
+ lao := workflow.GetLocalActivityOptions(ctx)
+ lao.ScheduleToCloseTimeout = time.Second * 10
+ if err := workflow.ExecuteLocalActivity(workflow.WithLocalActivityOptions(ctx, lao), func(ctx context.Context) (string, error) {
+ id, err := expression.EvalExpression(WorkflowWithInputIdexpression, req)
+ if err != nil {
+ return "", fmt.Errorf("error evaluating id expression for %q workflow: %w", WorkflowWithInputWorkflowName, err)
+ }
+ return id, nil
+ }).Get(ctx, &opts.WorkflowID); err != nil {
+ return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", WorkflowWithInputWorkflowName, err)
+ }
+ } else {
+ id, err := expression.EvalExpression(WorkflowWithInputIdexpression, req)
+ if err != nil {
+ return opts, fmt.Errorf("error evaluating id expression for %q workflow: %w", WorkflowWithInputWorkflowName, err)
+ }
+ opts.WorkflowID = id
+ }
+ }
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = v
+ } else if opts.WorkflowIDReusePolicy == enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = enumsv1.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE_FAILED_ONLY
+ }
+ if v := o.taskQueue; v != nil {
+ opts.TaskQueue = *v
+ } else if opts.TaskQueue == "" {
+ opts.TaskQueue = "option-v2"
+ }
+ if v := o.retryPolicy; v != nil {
+ opts.RetryPolicy = v
+ } else if opts.RetryPolicy == nil {
+ opts.RetryPolicy = &temporal.RetryPolicy{
+ MaximumAttempts: int32(5),
+ }
+ }
+ if v := o.searchAttributes; v != nil {
+ opts.SearchAttributes = o.searchAttributes
+ } else if opts.SearchAttributes == nil {
+ // wrap expression evaluation in local activity
+ // more info: https://cludden.github.io/protoc-gen-go-temporal/docs/guides/patches#pv_64-expression-evaluation-local-activity
+ if workflow.GetVersion(ctx, "cludden_protoc-gen-go-temporal_64_expression-evaluation-local-activity", workflow.DefaultVersion, 1) == 1 {
+ lao := workflow.GetLocalActivityOptions(ctx)
+ lao.ScheduleToCloseTimeout = time.Second * 10
+ if err := workflow.ExecuteLocalActivity(workflow.WithLocalActivityOptions(ctx, lao), func(ctx context.Context) (map[string]any, error) {
+ structured, err := expression.ToStructured(req)
+ if err != nil {
+ return nil, fmt.Errorf("error serializing input for \"WorkflowWithInput\" search attribute mapping: %v", err)
}
result, err := WorkflowWithInputSearchAttributesMapping.Query(structured)
if err != nil {
@@ -1231,6 +1692,35 @@ func NewTestTestClient(env *testsuite.TestWorkflowEnvironment, workflows TestWor
return &TestTestClient{env, workflows}
}
+// TestDefaultTaskQueue executes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow in the test environment
+func (c *TestTestClient) TestDefaultTaskQueue(ctx context.Context, req *TestDefaultTaskQueueInput, opts ...*TestDefaultTaskQueueOptions) (*TestDefaultTaskQueueOutput, error) {
+ run, err := c.TestDefaultTaskQueueAsync(ctx, req, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// TestDefaultTaskQueueAsync executes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow in the test environment
+func (c *TestTestClient) TestDefaultTaskQueueAsync(ctx context.Context, req *TestDefaultTaskQueueInput, options ...*TestDefaultTaskQueueOptions) (TestDefaultTaskQueueRun, error) {
+ var o *TestDefaultTaskQueueOptions
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewTestDefaultTaskQueueOptions()
+ }
+ opts, err := o.Build(req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing client.StartWorkflowOptions: %w", err)
+ }
+ return &testTestDefaultTaskQueueRun{client: c, env: c.env, opts: &opts, req: req, workflows: c.workflows}, nil
+}
+
+// GetTestDefaultTaskQueue is a noop
+func (c *TestTestClient) GetTestDefaultTaskQueue(ctx context.Context, workflowID string, runID string) TestDefaultTaskQueueRun {
+ return &testTestDefaultTaskQueueRun{env: c.env, workflows: c.workflows}
+}
+
// WorkflowWithInput executes a(n) test.option.v1.Test.WorkflowWithInput workflow in the test environment
func (c *TestTestClient) WorkflowWithInput(ctx context.Context, req *WorkflowWithInputRequest, opts ...*WorkflowWithInputOptions) error {
run, err := c.WorkflowWithInputAsync(ctx, req, opts...)
@@ -1353,6 +1843,61 @@ func (h *testUpdateWithInputHandle) WorkflowID() string {
return h.workflowID
}
+var _ TestDefaultTaskQueueRun = &testTestDefaultTaskQueueRun{}
+
+// testTestDefaultTaskQueueRun provides convenience methods for interacting with a(n) test.option.v1.Test.TestDefaultTaskQueue workflow in the test environment
+type testTestDefaultTaskQueueRun struct {
+ client *TestTestClient
+ env *testsuite.TestWorkflowEnvironment
+ opts *client.StartWorkflowOptions
+ req *TestDefaultTaskQueueInput
+ workflows TestWorkflows
+}
+
+// Cancel requests cancellation of a workflow in execution, returning an error if applicable
+func (r *testTestDefaultTaskQueueRun) Cancel(ctx context.Context) error {
+ return r.client.CancelWorkflow(ctx, r.ID(), r.RunID())
+}
+
+// Get retrieves a test test.option.v1.Test.TestDefaultTaskQueue workflow result
+func (r *testTestDefaultTaskQueueRun) Get(context.Context) (*TestDefaultTaskQueueOutput, error) {
+ r.env.ExecuteWorkflow(TestDefaultTaskQueueWorkflowName, r.req)
+ if !r.env.IsWorkflowCompleted() {
+ return nil, errors.New("workflow in progress")
+ }
+ if err := r.env.GetWorkflowError(); err != nil {
+ return nil, err
+ }
+ var result TestDefaultTaskQueueOutput
+ if err := r.env.GetWorkflowResult(&result); err != nil {
+ return nil, err
+ }
+ return &result, nil
+}
+
+// ID returns a test test.option.v1.Test.TestDefaultTaskQueue workflow run's workflow ID
+func (r *testTestDefaultTaskQueueRun) ID() string {
+ if r.opts != nil {
+ return r.opts.ID
+ }
+ return ""
+}
+
+// Run noop implementation
+func (r *testTestDefaultTaskQueueRun) Run() client.WorkflowRun {
+ return nil
+}
+
+// RunID noop implementation
+func (r *testTestDefaultTaskQueueRun) RunID() string {
+ return ""
+}
+
+// Terminate terminates a workflow in execution, returning an error if applicable
+func (r *testTestDefaultTaskQueueRun) Terminate(ctx context.Context, reason string, details ...interface{}) error {
+ return r.client.TerminateWorkflow(ctx, r.ID(), r.RunID(), reason, details...)
+}
+
var _ WorkflowWithInputRun = &testWorkflowWithInputRun{}
// testWorkflowWithInputRun provides convenience methods for interacting with a(n) test.option.v1.Test.WorkflowWithInput workflow in the test environment
@@ -1551,6 +2096,83 @@ func newTestCommands(options ...*TestCliOptions) ([]*v2.Command, error) {
}
},
},
+ {
+ Name: "test-default-task-queue",
+ Usage: "executes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow",
+ Category: "WORKFLOWS",
+ UseShortOptionHandling: true,
+ Before: opts.before,
+ After: opts.after,
+ Flags: []v2.Flag{
+ &v2.BoolFlag{
+ Name: "detach",
+ Usage: "run workflow in the background and print workflow and execution id",
+ Aliases: []string{"d"},
+ },
+ &v2.StringFlag{
+ Name: "task-queue",
+ Usage: "task queue name",
+ Aliases: []string{"t"},
+ EnvVars: []string{"TEMPORAL_TASK_QUEUE_NAME", "TEMPORAL_TASK_QUEUE", "TASK_QUEUE_NAME", "TASK_QUEUE"},
+ Value: "option-v1",
+ },
+ &v2.StringFlag{
+ Name: "input-file",
+ Usage: "path to json-formatted input file",
+ Aliases: []string{"f"},
+ },
+ &v2.StringSliceFlag{
+ Name: "task-queues",
+ Usage: "set the value of the operation's \"TaskQueues\" parameter",
+ Category: "INPUT",
+ },
+ &v2.Uint64Flag{
+ Name: "depth",
+ Usage: "set the value of the operation's \"Depth\" parameter",
+ Category: "INPUT",
+ },
+ },
+ Action: func(cmd *v2.Context) error {
+ tc, err := opts.clientForCommand(cmd)
+ if err != nil {
+ return fmt.Errorf("error initializing client for command: %w", err)
+ }
+ defer tc.Close()
+ c := NewTestClient(tc)
+ req, err := UnmarshalCliFlagsToTestDefaultTaskQueueInput(cmd)
+ if err != nil {
+ return fmt.Errorf("error unmarshalling request: %w", err)
+ }
+ opts := client.StartWorkflowOptions{}
+ if tq := cmd.String("task-queue"); tq != "" {
+ opts.TaskQueue = tq
+ }
+ run, err := c.TestDefaultTaskQueueAsync(cmd.Context, req, NewTestDefaultTaskQueueOptions().WithStartWorkflowOptions(opts))
+ if err != nil {
+ return fmt.Errorf("error starting %s workflow: %w", TestDefaultTaskQueueWorkflowName, err)
+ }
+ if cmd.Bool("detach") {
+ fmt.Println("success")
+ fmt.Printf("workflow id: %s\n", run.ID())
+ fmt.Printf("run id: %s\n", run.RunID())
+ return nil
+ }
+ if resp, err := run.Get(cmd.Context); err != nil {
+ return err
+ } else {
+ b, err := protojson.Marshal(resp)
+ if err != nil {
+ return fmt.Errorf("error serializing response json: %w", err)
+ }
+ var out bytes.Buffer
+ if err := json.Indent(&out, b, "", " "); err != nil {
+ return fmt.Errorf("error formatting json: %w", err)
+ }
+ fmt.Println(out.String())
+ return nil
+ }
+ },
+ },
{
Name: "workflow-with-input",
Usage: "executes a(n) test.option.v1.Test.WorkflowWithInput workflow",
@@ -1679,6 +2301,42 @@ func UnmarshalCliFlagsToUpdateWithInputRequest(cmd *v2.Context) (*UpdateWithInpu
return &result, nil
}
+// UnmarshalCliFlagsToTestDefaultTaskQueueInput unmarshals a TestDefaultTaskQueueInput from command line flags
+func UnmarshalCliFlagsToTestDefaultTaskQueueInput(cmd *v2.Context) (*TestDefaultTaskQueueInput, error) {
+ var result TestDefaultTaskQueueInput
+ var hasValues bool
+ if cmd.IsSet("input-file") {
+ inputFile, err := gohomedir.Expand(cmd.String("input-file"))
+ if err != nil {
+ inputFile = cmd.String("input-file")
+ }
+ b, err := os.ReadFile(inputFile)
+ if err != nil {
+ return nil, fmt.Errorf("error reading input-file: %w", err)
+ }
+ if err := protojson.Unmarshal(b, &result); err != nil {
+ return nil, fmt.Errorf("error parsing input-file json: %w", err)
+ }
+ hasValues = true
+ }
+ if cmd.IsSet("task-queues") {
+ hasValues = true
+ var tmp TestDefaultTaskQueueInput
+ if err := protojson.Unmarshal([]byte(fmt.Sprintf("{\"taskQueues\":%s}", cmd.String("task-queues"))), &tmp); err != nil {
+ return nil, fmt.Errorf("error unmarshalling \"task-queues\" map flag: %w", err)
+ }
+ result.TaskQueues = tmp.TaskQueues
+ }
+ if cmd.IsSet("depth") {
+ hasValues = true
+ result.Depth = uint32(cmd.Uint64("depth"))
+ }
+ if !hasValues {
+ return nil, nil
+ }
+ return &result, nil
+}
+
// UnmarshalCliFlagsToWorkflowWithInputRequest unmarshals a WorkflowWithInputRequest from command line flags
func UnmarshalCliFlagsToWorkflowWithInputRequest(cmd *v2.Context) (*WorkflowWithInputRequest, error) {
var result WorkflowWithInputRequest
@@ -1713,6 +2371,934 @@ func WithTestSchemeTypes() scheme.Option {
s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("ActivityWithInputRequest"))
s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("ActivityWithInputResponse"))
s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("UpdateWithInputRequest"))
+ s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("TestDefaultTaskQueueInput"))
+ s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("TestDefaultTaskQueueOutput"))
s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("WorkflowWithInputRequest"))
}
}
+
+// UseParentTaskQueueTaskQueue is the default task-queue for a test.option.v1.UseParentTaskQueue worker
+const UseParentTaskQueueTaskQueue = "use-parent-task-queue"
+
+// test.option.v1.UseParentTaskQueue workflow names
+const (
+ TestParentTaskQueueWorkflowName = "test.option.v1.UseParentTaskQueue.TestParentTaskQueue"
+)
+
+// UseParentTaskQueueClient describes a client for a(n) test.option.v1.UseParentTaskQueue worker
+type UseParentTaskQueueClient interface {
+ // TestParentTaskQueue executes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and blocks until error or response received
+ TestParentTaskQueue(ctx context.Context, req *TestParentTaskQueueInput, opts ...*TestParentTaskQueueOptions) (*TestParentTaskQueueOutput, error)
+
+ // TestParentTaskQueueAsync starts a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and returns a handle to the workflow run
+ TestParentTaskQueueAsync(ctx context.Context, req *TestParentTaskQueueInput, opts ...*TestParentTaskQueueOptions) (TestParentTaskQueueRun, error)
+
+ // GetTestParentTaskQueue retrieves a handle to an existing test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow execution
+ GetTestParentTaskQueue(ctx context.Context, workflowID string, runID string) TestParentTaskQueueRun
+
+ // CancelWorkflow requests cancellation of an existing workflow execution
+ CancelWorkflow(ctx context.Context, workflowID string, runID string) error
+
+ // TerminateWorkflow an existing workflow execution
+ TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error
+}
+
+// useParentTaskQueueClient implements a temporal client for a test.option.v1.UseParentTaskQueue service
+type useParentTaskQueueClient struct {
+ client client.Client
+ log *slog.Logger
+}
+
+// NewUseParentTaskQueueClient initializes a new test.option.v1.UseParentTaskQueue client
+func NewUseParentTaskQueueClient(c client.Client, options ...*useParentTaskQueueClientOptions) UseParentTaskQueueClient {
+ var cfg *useParentTaskQueueClientOptions
+ if len(options) > 0 {
+ cfg = options[0]
+ } else {
+ cfg = NewUseParentTaskQueueClientOptions()
+ }
+ return &useParentTaskQueueClient{
+ client: c,
+ log: cfg.getLogger(),
+ }
+}
+
+// NewUseParentTaskQueueClientWithOptions initializes a new UseParentTaskQueue client with the given options
+func NewUseParentTaskQueueClientWithOptions(c client.Client, opts client.Options, options ...*useParentTaskQueueClientOptions) (UseParentTaskQueueClient, error) {
+ var err error
+ c, err = client.NewClientFromExisting(c, opts)
+ if err != nil {
+ return nil, fmt.Errorf("error initializing client with options: %w", err)
+ }
+ var cfg *useParentTaskQueueClientOptions
+ if len(options) > 0 {
+ cfg = options[0]
+ } else {
+ cfg = NewUseParentTaskQueueClientOptions()
+ }
+ return &useParentTaskQueueClient{
+ client: c,
+ log: cfg.getLogger(),
+ }, nil
+}
+
+// useParentTaskQueueClientOptions describes optional runtime configuration for a UseParentTaskQueueClient
+type useParentTaskQueueClientOptions struct {
+ log *slog.Logger
+}
+
+// NewUseParentTaskQueueClientOptions initializes a new useParentTaskQueueClientOptions value
+func NewUseParentTaskQueueClientOptions() *useParentTaskQueueClientOptions {
+ return &useParentTaskQueueClientOptions{}
+}
+
+// WithLogger can be used to override the default logger
+func (opts *useParentTaskQueueClientOptions) WithLogger(l *slog.Logger) *useParentTaskQueueClientOptions {
+ if l != nil {
+ opts.log = l
+ }
+ return opts
+}
+
+// getLogger returns the configured logger, or the default logger
+func (opts *useParentTaskQueueClientOptions) getLogger() *slog.Logger {
+ if opts != nil && opts.log != nil {
+ return opts.log
+ }
+ return slog.Default()
+}
+
+// test.option.v1.UseParentTaskQueue.TestParentTaskQueue executes a test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and blocks until error or response received
+func (c *useParentTaskQueueClient) TestParentTaskQueue(ctx context.Context, req *TestParentTaskQueueInput, options ...*TestParentTaskQueueOptions) (*TestParentTaskQueueOutput, error) {
+ run, err := c.TestParentTaskQueueAsync(ctx, req, options...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// TestParentTaskQueueAsync starts a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and returns a handle to the workflow run
+func (c *useParentTaskQueueClient) TestParentTaskQueueAsync(ctx context.Context, req *TestParentTaskQueueInput, options ...*TestParentTaskQueueOptions) (TestParentTaskQueueRun, error) {
+ var o *TestParentTaskQueueOptions
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewTestParentTaskQueueOptions()
+ }
+ opts, err := o.Build(req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing client.StartWorkflowOptions: %w", err)
+ }
+ run, err := c.client.ExecuteWorkflow(ctx, opts, TestParentTaskQueueWorkflowName, req)
+ if err != nil {
+ return nil, err
+ }
+ if run == nil {
+ return nil, errors.New("execute workflow returned nil run")
+ }
+ return &testParentTaskQueueRun{
+ client: c,
+ run: run,
+ }, nil
+}
+
+// GetTestParentTaskQueue fetches an existing test.option.v1.UseParentTaskQueue.TestParentTaskQueue execution
+func (c *useParentTaskQueueClient) GetTestParentTaskQueue(ctx context.Context, workflowID string, runID string) TestParentTaskQueueRun {
+ return &testParentTaskQueueRun{
+ client: c,
+ run: c.client.GetWorkflow(ctx, workflowID, runID),
+ }
+}
+
+// CancelWorkflow requests cancellation of an existing workflow execution
+func (c *useParentTaskQueueClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error {
+ return c.client.CancelWorkflow(ctx, workflowID, runID)
+}
+
+// TerminateWorkflow terminates an existing workflow execution
+func (c *useParentTaskQueueClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error {
+ return c.client.TerminateWorkflow(ctx, workflowID, runID, reason, details...)
+}
+
+// TestParentTaskQueueOptions provides configuration for a test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow operation
+type TestParentTaskQueueOptions struct {
+ options client.StartWorkflowOptions
+ executionTimeout *time.Duration
+ id *string
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
+ retryPolicy *temporal.RetryPolicy
+ runTimeout *time.Duration
+ searchAttributes map[string]any
+ taskQueue *string
+ taskTimeout *time.Duration
+}
+
+// NewTestParentTaskQueueOptions initializes a new TestParentTaskQueueOptions value
+func NewTestParentTaskQueueOptions() *TestParentTaskQueueOptions {
+ return &TestParentTaskQueueOptions{}
+}
+
+// Build initializes a new go.temporal.io/sdk/client.StartWorkflowOptions value with defaults and overrides applied
+func (o *TestParentTaskQueueOptions) Build(req protoreflect.Message) (client.StartWorkflowOptions, error) {
+ opts := o.options
+ if v := o.id; v != nil {
+ opts.ID = *v
+ }
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = v
+ }
+ if v := o.taskQueue; v != nil {
+ opts.TaskQueue = *v
+ } else if opts.TaskQueue == "" {
+ opts.TaskQueue = UseParentTaskQueueTaskQueue
+ }
+ if v := o.retryPolicy; v != nil {
+ opts.RetryPolicy = v
+ }
+ if v := o.searchAttributes; v != nil {
+ opts.SearchAttributes = o.searchAttributes
+ }
+ if v := o.executionTimeout; v != nil {
+ opts.WorkflowExecutionTimeout = *v
+ }
+ if v := o.runTimeout; v != nil {
+ opts.WorkflowRunTimeout = *v
+ }
+ if v := o.taskTimeout; v != nil {
+ opts.WorkflowTaskTimeout = *v
+ }
+ return opts, nil
+}
+
+// WithStartWorkflowOptions sets the initial go.temporal.io/sdk/client.StartWorkflowOptions
+func (o *TestParentTaskQueueOptions) WithStartWorkflowOptions(options client.StartWorkflowOptions) *TestParentTaskQueueOptions {
+ o.options = options
+ return o
+}
+
+// WithExecutionTimeout sets the WorkflowExecutionTimeout value
+func (o *TestParentTaskQueueOptions) WithExecutionTimeout(d time.Duration) *TestParentTaskQueueOptions {
+ o.executionTimeout = &d
+ return o
+}
+
+// WithID sets the ID value
+func (o *TestParentTaskQueueOptions) WithID(id string) *TestParentTaskQueueOptions {
+ o.id = &id
+ return o
+}
+
+// WithIDReusePolicy sets the WorkflowIDReusePolicy value
+func (o *TestParentTaskQueueOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *TestParentTaskQueueOptions {
+ o.idReusePolicy = policy
+ return o
+}
+
+// WithRetryPolicy sets the RetryPolicy value
+func (o *TestParentTaskQueueOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *TestParentTaskQueueOptions {
+ o.retryPolicy = policy
+ return o
+}
+
+// WithRunTimeout sets the WorkflowRunTimeout value
+func (o *TestParentTaskQueueOptions) WithRunTimeout(d time.Duration) *TestParentTaskQueueOptions {
+ o.runTimeout = &d
+ return o
+}
+
+// WithSearchAttributes sets the SearchAttributes value
+func (o *TestParentTaskQueueOptions) WithSearchAttributes(sa map[string]any) *TestParentTaskQueueOptions {
+ o.searchAttributes = sa
+ return o
+}
+
+// WithTaskTimeout sets the WorkflowTaskTimeout value
+func (o *TestParentTaskQueueOptions) WithTaskTimeout(d time.Duration) *TestParentTaskQueueOptions {
+ o.taskTimeout = &d
+ return o
+}
+
+// WithTaskQueue sets the TaskQueue value
+func (o *TestParentTaskQueueOptions) WithTaskQueue(tq string) *TestParentTaskQueueOptions {
+ o.taskQueue = &tq
+ return o
+}
+
+// TestParentTaskQueueRun describes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow run
+type TestParentTaskQueueRun interface {
+ // ID returns the workflow ID
+ ID() string
+
+ // RunID returns the workflow instance ID
+ RunID() string
+
+ // Run returns the inner client.WorkflowRun
+ Run() client.WorkflowRun
+
+ // Get blocks until the workflow is complete and returns the result
+ Get(ctx context.Context) (*TestParentTaskQueueOutput, error)
+
+ // Cancel requests cancellation of a workflow in execution, returning an error if applicable
+ Cancel(ctx context.Context) error
+
+ // Terminate terminates a workflow in execution, returning an error if applicable
+ Terminate(ctx context.Context, reason string, details ...interface{}) error
+}
+
+// testParentTaskQueueRun provides an internal implementation of a(n) TestParentTaskQueueRunRun
+type testParentTaskQueueRun struct {
+ client *useParentTaskQueueClient
+ run client.WorkflowRun
+}
+
+// ID returns the workflow ID
+func (r *testParentTaskQueueRun) ID() string {
+ return r.run.GetID()
+}
+
+// Run returns the inner client.WorkflowRun
+func (r *testParentTaskQueueRun) Run() client.WorkflowRun {
+ return r.run
+}
+
+// RunID returns the execution ID
+func (r *testParentTaskQueueRun) RunID() string {
+ return r.run.GetRunID()
+}
+
+// Cancel requests cancellation of a workflow in execution, returning an error if applicable
+func (r *testParentTaskQueueRun) Cancel(ctx context.Context) error {
+ return r.client.CancelWorkflow(ctx, r.ID(), r.RunID())
+}
+
+// Get blocks until the workflow is complete, returning the result if applicable
+func (r *testParentTaskQueueRun) Get(ctx context.Context) (*TestParentTaskQueueOutput, error) {
+ var resp TestParentTaskQueueOutput
+ if err := r.run.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Terminate terminates a workflow in execution, returning an error if applicable
+func (r *testParentTaskQueueRun) Terminate(ctx context.Context, reason string, details ...interface{}) error {
+ return r.client.TerminateWorkflow(ctx, r.ID(), r.RunID(), reason, details...)
+}
+
+// Reference to generated workflow functions
+var (
+ // TestParentTaskQueueFunction implements a "test.option.v1.UseParentTaskQueue.TestParentTaskQueue" workflow
+ TestParentTaskQueueFunction func(workflow.Context, *TestParentTaskQueueInput) (*TestParentTaskQueueOutput, error)
+)
+
+// UseParentTaskQueueWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows
+type (
+ // UseParentTaskQueueWorkflowFunctions describes a mockable dependency for inlining workflows within other workflows
+ UseParentTaskQueueWorkflowFunctions interface {
+ // TestParentTaskQueue executes a "test.option.v1.UseParentTaskQueue.TestParentTaskQueue" workflow inline
+ TestParentTaskQueue(workflow.Context, *TestParentTaskQueueInput) (*TestParentTaskQueueOutput, error)
+ }
+ // useParentTaskQueueWorkflowFunctions provides an internal UseParentTaskQueueWorkflowFunctions implementation
+ useParentTaskQueueWorkflowFunctions struct{}
+)
+
+func NewUseParentTaskQueueWorkflowFunctions() UseParentTaskQueueWorkflowFunctions {
+ return &useParentTaskQueueWorkflowFunctions{}
+}
+
+// TestParentTaskQueue executes a "test.option.v1.UseParentTaskQueue.TestParentTaskQueue" workflow inline
+func (f *useParentTaskQueueWorkflowFunctions) TestParentTaskQueue(ctx workflow.Context, req *TestParentTaskQueueInput) (*TestParentTaskQueueOutput, error) {
+ if TestParentTaskQueueFunction == nil {
+ return nil, errors.New("TestParentTaskQueue requires workflow registration via RegisterUseParentTaskQueueWorkflows or RegisterTestParentTaskQueueWorkflow")
+ }
+ return TestParentTaskQueueFunction(ctx, req)
+}
+
+// UseParentTaskQueueWorkflows provides methods for initializing new test.option.v1.UseParentTaskQueue workflow values
+type UseParentTaskQueueWorkflows interface {
+ // TestParentTaskQueue initializes a new a(n) TestParentTaskQueueWorkflow implementation
+ TestParentTaskQueue(ctx workflow.Context, input *TestParentTaskQueueWorkflowInput) (TestParentTaskQueueWorkflow, error)
+}
+
+// RegisterUseParentTaskQueueWorkflows registers test.option.v1.UseParentTaskQueue workflows with the given worker
+func RegisterUseParentTaskQueueWorkflows(r worker.WorkflowRegistry, workflows UseParentTaskQueueWorkflows) {
+ RegisterTestParentTaskQueueWorkflow(r, workflows.TestParentTaskQueue)
+}
+
+// RegisterTestParentTaskQueueWorkflow registers a test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow with the given worker
+func RegisterTestParentTaskQueueWorkflow(r worker.WorkflowRegistry, wf func(workflow.Context, *TestParentTaskQueueWorkflowInput) (TestParentTaskQueueWorkflow, error)) {
+ TestParentTaskQueueFunction = buildTestParentTaskQueue(wf)
+ r.RegisterWorkflowWithOptions(TestParentTaskQueueFunction, workflow.RegisterOptions{Name: TestParentTaskQueueWorkflowName})
+}
+
+// buildTestParentTaskQueue converts a TestParentTaskQueue workflow struct into a valid workflow function
+func buildTestParentTaskQueue(ctor func(workflow.Context, *TestParentTaskQueueWorkflowInput) (TestParentTaskQueueWorkflow, error)) func(workflow.Context, *TestParentTaskQueueInput) (*TestParentTaskQueueOutput, error) {
+ return func(ctx workflow.Context, req *TestParentTaskQueueInput) (*TestParentTaskQueueOutput, error) {
+ input := &TestParentTaskQueueWorkflowInput{
+ Req: req,
+ }
+ wf, err := ctor(ctx, input)
+ if err != nil {
+ return nil, err
+ }
+ if initializable, ok := wf.(helpers.Initializable); ok {
+ if err := initializable.Initialize(ctx); err != nil {
+ return nil, err
+ }
+ }
+ return wf.Execute(ctx)
+ }
+}
+
+// TestParentTaskQueueWorkflowInput describes the input to a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow constructor
+type TestParentTaskQueueWorkflowInput struct {
+ Req *TestParentTaskQueueInput
+}
+
+// TestParentTaskQueueWorkflow describes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow implementation
+type TestParentTaskQueueWorkflow interface {
+ // Execute defines the entrypoint to a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow
+ Execute(ctx workflow.Context) (*TestParentTaskQueueOutput, error)
+}
+
+// TestParentTaskQueueChild executes a child test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and blocks until error or response received
+func TestParentTaskQueueChild(ctx workflow.Context, req *TestParentTaskQueueInput, options ...*TestParentTaskQueueChildOptions) (*TestParentTaskQueueOutput, error) {
+ childRun, err := TestParentTaskQueueChildAsync(ctx, req, options...)
+ if err != nil {
+ return nil, err
+ }
+ return childRun.Get(ctx)
+}
+
+// TestParentTaskQueueChildAsync starts a child test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and returns a handle to the child workflow run
+func TestParentTaskQueueChildAsync(ctx workflow.Context, req *TestParentTaskQueueInput, options ...*TestParentTaskQueueChildOptions) (*TestParentTaskQueueChildRun, error) {
+ var o *TestParentTaskQueueChildOptions
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewTestParentTaskQueueChildOptions()
+ }
+ opts, err := o.Build(ctx, req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing workflow.ChildWorkflowOptions: %w", err)
+ }
+ ctx = workflow.WithChildOptions(ctx, opts)
+ return &TestParentTaskQueueChildRun{Future: workflow.ExecuteChildWorkflow(ctx, TestParentTaskQueueWorkflowName, req)}, nil
+}
+
+// TestParentTaskQueueChildOptions provides configuration for a child test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow operation
+type TestParentTaskQueueChildOptions struct {
+ options workflow.ChildWorkflowOptions
+ executionTimeout *time.Duration
+ id *string
+ idReusePolicy enumsv1.WorkflowIdReusePolicy
+ retryPolicy *temporal.RetryPolicy
+ runTimeout *time.Duration
+ searchAttributes map[string]any
+ taskQueue *string
+ taskTimeout *time.Duration
+ parentClosePolicy enumsv1.ParentClosePolicy
+ waitForCancellation *bool
+}
+
+// NewTestParentTaskQueueChildOptions initializes a new TestParentTaskQueueChildOptions value
+func NewTestParentTaskQueueChildOptions() *TestParentTaskQueueChildOptions {
+ return &TestParentTaskQueueChildOptions{}
+}
+
+// Build initializes a new go.temporal.io/sdk/workflow.ChildWorkflowOptions value with defaults and overrides applied
+func (o *TestParentTaskQueueChildOptions) Build(ctx workflow.Context, req protoreflect.Message) (workflow.ChildWorkflowOptions, error) {
+ opts := o.options
+ if v := o.id; v != nil {
+ opts.WorkflowID = *v
+ }
+ if v := o.idReusePolicy; v != enumsv1.WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED {
+ opts.WorkflowIDReusePolicy = v
+ }
+ if v := o.taskQueue; v != nil {
+ opts.TaskQueue = *v
+ } else if opts.TaskQueue == "" {
+ opts.TaskQueue = workflow.GetInfo(ctx).TaskQueueName
+ }
+ if v := o.retryPolicy; v != nil {
+ opts.RetryPolicy = v
+ }
+ if v := o.searchAttributes; v != nil {
+ opts.SearchAttributes = o.searchAttributes
+ }
+ if v := o.executionTimeout; v != nil {
+ opts.WorkflowExecutionTimeout = *v
+ }
+ if v := o.runTimeout; v != nil {
+ opts.WorkflowRunTimeout = *v
+ }
+ if v := o.taskTimeout; v != nil {
+ opts.WorkflowTaskTimeout = *v
+ }
+ if v := o.parentClosePolicy; v != enumsv1.PARENT_CLOSE_POLICY_UNSPECIFIED {
+ opts.ParentClosePolicy = v
+ }
+ if v := o.waitForCancellation; v != nil {
+ opts.WaitForCancellation = *v
+ }
+ return opts, nil
+}
+
+// WithChildWorkflowOptions sets the initial go.temporal.io/sdk/workflow.ChildWorkflowOptions
+func (o *TestParentTaskQueueChildOptions) WithChildWorkflowOptions(options workflow.ChildWorkflowOptions) *TestParentTaskQueueChildOptions {
+ o.options = options
+ return o
+}
+
+// WithExecutionTimeout sets the WorkflowExecutionTimeout value
+func (o *TestParentTaskQueueChildOptions) WithExecutionTimeout(d time.Duration) *TestParentTaskQueueChildOptions {
+ o.executionTimeout = &d
+ return o
+}
+
+// WithID sets the WorkflowID value
+func (o *TestParentTaskQueueChildOptions) WithID(id string) *TestParentTaskQueueChildOptions {
+ o.id = &id
+ return o
+}
+
+// WithIDReusePolicy sets the WorkflowIDReusePolicy value
+func (o *TestParentTaskQueueChildOptions) WithIDReusePolicy(policy enumsv1.WorkflowIdReusePolicy) *TestParentTaskQueueChildOptions {
+ o.idReusePolicy = policy
+ return o
+}
+
+// WithParentClosePolicy sets the WorkflowIDReusePolicy value
+func (o *TestParentTaskQueueChildOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *TestParentTaskQueueChildOptions {
+ o.parentClosePolicy = policy
+ return o
+}
+
+// WithRetryPolicy sets the RetryPolicy value
+func (o *TestParentTaskQueueChildOptions) WithRetryPolicy(policy *temporal.RetryPolicy) *TestParentTaskQueueChildOptions {
+ o.retryPolicy = policy
+ return o
+}
+
+// WithRunTimeout sets the WorkflowRunTimeout value
+func (o *TestParentTaskQueueChildOptions) WithRunTimeout(d time.Duration) *TestParentTaskQueueChildOptions {
+ o.runTimeout = &d
+ return o
+}
+
+// WithSearchAttributes sets the SearchAttributes value
+func (o *TestParentTaskQueueChildOptions) WithSearchAttributes(sa map[string]any) *TestParentTaskQueueChildOptions {
+ o.searchAttributes = sa
+ return o
+}
+
+// WithTaskTimeout sets the WorkflowTaskTimeout value
+func (o *TestParentTaskQueueChildOptions) WithTaskTimeout(d time.Duration) *TestParentTaskQueueChildOptions {
+ o.taskTimeout = &d
+ return o
+}
+
+// WithTaskQueue sets the TaskQueue value
+func (o *TestParentTaskQueueChildOptions) WithTaskQueue(tq string) *TestParentTaskQueueChildOptions {
+ o.taskQueue = &tq
+ return o
+}
+
+// WithWaitForCancellation sets the WaitForCancellation value
+func (o *TestParentTaskQueueChildOptions) WithWaitForCancellation(wait bool) *TestParentTaskQueueChildOptions {
+ o.waitForCancellation = &wait
+ return o
+}
+
+// TestParentTaskQueueChildRun describes a child TestParentTaskQueue workflow run
+type TestParentTaskQueueChildRun struct {
+ Future workflow.ChildWorkflowFuture
+}
+
+// Get blocks until the workflow is completed, returning the response value
+func (r *TestParentTaskQueueChildRun) Get(ctx workflow.Context) (*TestParentTaskQueueOutput, error) {
+ var resp TestParentTaskQueueOutput
+ if err := r.Future.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// Select adds this completion to the selector. Callback can be nil.
+func (r *TestParentTaskQueueChildRun) Select(sel workflow.Selector, fn func(*TestParentTaskQueueChildRun)) workflow.Selector {
+ return sel.AddFuture(r.Future, func(workflow.Future) {
+ if fn != nil {
+ fn(r)
+ }
+ })
+}
+
+// SelectStart adds waiting for start to the selector. Callback can be nil.
+func (r *TestParentTaskQueueChildRun) SelectStart(sel workflow.Selector, fn func(*TestParentTaskQueueChildRun)) workflow.Selector {
+ return sel.AddFuture(r.Future.GetChildWorkflowExecution(), func(workflow.Future) {
+ if fn != nil {
+ fn(r)
+ }
+ })
+}
+
+// WaitStart waits for the child workflow to start
+func (r *TestParentTaskQueueChildRun) WaitStart(ctx workflow.Context) (*workflow.Execution, error) {
+ var exec workflow.Execution
+ if err := r.Future.GetChildWorkflowExecution().Get(ctx, &exec); err != nil {
+ return nil, err
+ }
+ return &exec, nil
+}
+
+// UseParentTaskQueueActivities describes available worker activities
+type UseParentTaskQueueActivities interface{}
+
+// RegisterUseParentTaskQueueActivities registers activities with a worker
+func RegisterUseParentTaskQueueActivities(r worker.ActivityRegistry, activities UseParentTaskQueueActivities) {
+}
+
+// TestClient provides a testsuite-compatible Client
+type TestUseParentTaskQueueClient struct {
+ env *testsuite.TestWorkflowEnvironment
+ workflows UseParentTaskQueueWorkflows
+}
+
+var _ UseParentTaskQueueClient = &TestUseParentTaskQueueClient{}
+
+// NewTestUseParentTaskQueueClient initializes a new TestUseParentTaskQueueClient value
+func NewTestUseParentTaskQueueClient(env *testsuite.TestWorkflowEnvironment, workflows UseParentTaskQueueWorkflows, activities UseParentTaskQueueActivities) *TestUseParentTaskQueueClient {
+ if workflows != nil {
+ RegisterUseParentTaskQueueWorkflows(env, workflows)
+ }
+ if activities != nil {
+ RegisterUseParentTaskQueueActivities(env, activities)
+ }
+ return &TestUseParentTaskQueueClient{env, workflows}
+}
+
+// TestParentTaskQueue executes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow in the test environment
+func (c *TestUseParentTaskQueueClient) TestParentTaskQueue(ctx context.Context, req *TestParentTaskQueueInput, opts ...*TestParentTaskQueueOptions) (*TestParentTaskQueueOutput, error) {
+ run, err := c.TestParentTaskQueueAsync(ctx, req, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// TestParentTaskQueueAsync executes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow in the test environment
+func (c *TestUseParentTaskQueueClient) TestParentTaskQueueAsync(ctx context.Context, req *TestParentTaskQueueInput, options ...*TestParentTaskQueueOptions) (TestParentTaskQueueRun, error) {
+ var o *TestParentTaskQueueOptions
+ if len(options) > 0 && options[0] != nil {
+ o = options[0]
+ } else {
+ o = NewTestParentTaskQueueOptions()
+ }
+ opts, err := o.Build(req.ProtoReflect())
+ if err != nil {
+ return nil, fmt.Errorf("error initializing client.StartWorkflowOptions: %w", err)
+ }
+ return &testTestParentTaskQueueRun{client: c, env: c.env, opts: &opts, req: req, workflows: c.workflows}, nil
+}
+
+// GetTestParentTaskQueue is a noop
+func (c *TestUseParentTaskQueueClient) GetTestParentTaskQueue(ctx context.Context, workflowID string, runID string) TestParentTaskQueueRun {
+ return &testTestParentTaskQueueRun{env: c.env, workflows: c.workflows}
+}
+
+// CancelWorkflow requests cancellation of an existing workflow execution
+func (c *TestUseParentTaskQueueClient) CancelWorkflow(ctx context.Context, workflowID string, runID string) error {
+ c.env.CancelWorkflow()
+ return nil
+}
+
+// TerminateWorkflow terminates an existing workflow execution
+func (c *TestUseParentTaskQueueClient) TerminateWorkflow(ctx context.Context, workflowID string, runID string, reason string, details ...interface{}) error {
+ return c.CancelWorkflow(ctx, workflowID, runID)
+}
+
+var _ TestParentTaskQueueRun = &testTestParentTaskQueueRun{}
+
+// testTestParentTaskQueueRun provides convenience methods for interacting with a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow in the test environment
+type testTestParentTaskQueueRun struct {
+ client *TestUseParentTaskQueueClient
+ env *testsuite.TestWorkflowEnvironment
+ opts *client.StartWorkflowOptions
+ req *TestParentTaskQueueInput
+ workflows UseParentTaskQueueWorkflows
+}
+
+// Cancel requests cancellation of a workflow in execution, returning an error if applicable
+func (r *testTestParentTaskQueueRun) Cancel(ctx context.Context) error {
+ return r.client.CancelWorkflow(ctx, r.ID(), r.RunID())
+}
+
+// Get retrieves a test test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow result
+func (r *testTestParentTaskQueueRun) Get(context.Context) (*TestParentTaskQueueOutput, error) {
+ r.env.ExecuteWorkflow(TestParentTaskQueueWorkflowName, r.req)
+ if !r.env.IsWorkflowCompleted() {
+ return nil, errors.New("workflow in progress")
+ }
+ if err := r.env.GetWorkflowError(); err != nil {
+ return nil, err
+ }
+ var result TestParentTaskQueueOutput
+ if err := r.env.GetWorkflowResult(&result); err != nil {
+ return nil, err
+ }
+ return &result, nil
+}
+
+// ID returns a test test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow run's workflow ID
+func (r *testTestParentTaskQueueRun) ID() string {
+ if r.opts != nil {
+ return r.opts.ID
+ }
+ return ""
+}
+
+// Run noop implementation
+func (r *testTestParentTaskQueueRun) Run() client.WorkflowRun {
+ return nil
+}
+
+// RunID noop implementation
+func (r *testTestParentTaskQueueRun) RunID() string {
+ return ""
+}
+
+// Terminate terminates a workflow in execution, returning an error if applicable
+func (r *testTestParentTaskQueueRun) Terminate(ctx context.Context, reason string, details ...interface{}) error {
+ return r.client.TerminateWorkflow(ctx, r.ID(), r.RunID(), reason, details...)
+}
+
+// UseParentTaskQueueCliOptions describes runtime configuration for test.option.v1.UseParentTaskQueue cli
+type UseParentTaskQueueCliOptions struct {
+ after func(*v2.Context) error
+ before func(*v2.Context) error
+ clientForCommand func(*v2.Context) (client.Client, error)
+ worker func(*v2.Context, client.Client) (worker.Worker, error)
+}
+
+// NewUseParentTaskQueueCliOptions initializes a new UseParentTaskQueueCliOptions value
+func NewUseParentTaskQueueCliOptions() *UseParentTaskQueueCliOptions {
+ return &UseParentTaskQueueCliOptions{}
+}
+
+// WithAfter injects a custom After hook to be run after any command invocation
+func (opts *UseParentTaskQueueCliOptions) WithAfter(fn func(*v2.Context) error) *UseParentTaskQueueCliOptions {
+ opts.after = fn
+ return opts
+}
+
+// WithBefore injects a custom Before hook to be run prior to any command invocation
+func (opts *UseParentTaskQueueCliOptions) WithBefore(fn func(*v2.Context) error) *UseParentTaskQueueCliOptions {
+ opts.before = fn
+ return opts
+}
+
+// WithClient provides a Temporal client factory for use by commands
+func (opts *UseParentTaskQueueCliOptions) WithClient(fn func(*v2.Context) (client.Client, error)) *UseParentTaskQueueCliOptions {
+ opts.clientForCommand = fn
+ return opts
+}
+
+// WithWorker provides an method for initializing a worker
+func (opts *UseParentTaskQueueCliOptions) WithWorker(fn func(*v2.Context, client.Client) (worker.Worker, error)) *UseParentTaskQueueCliOptions {
+ opts.worker = fn
+ return opts
+}
+
+// NewUseParentTaskQueueCli initializes a cli for a(n) test.option.v1.UseParentTaskQueue service
+func NewUseParentTaskQueueCli(options ...*UseParentTaskQueueCliOptions) (*v2.App, error) {
+ commands, err := newUseParentTaskQueueCommands(options...)
+ if err != nil {
+ return nil, fmt.Errorf("error initializing subcommands: %w", err)
+ }
+ return &v2.App{
+ Name: "use-parent-task-queue",
+ Commands: commands,
+ }, nil
+}
+
+// NewUseParentTaskQueueCliCommand initializes a cli command for a test.option.v1.UseParentTaskQueue service with subcommands for each query, signal, update, and workflow
+func NewUseParentTaskQueueCliCommand(options ...*UseParentTaskQueueCliOptions) (*v2.Command, error) {
+ subcommands, err := newUseParentTaskQueueCommands(options...)
+ if err != nil {
+ return nil, fmt.Errorf("error initializing subcommands: %w", err)
+ }
+ return &v2.Command{
+ Name: "use-parent-task-queue",
+ Subcommands: subcommands,
+ }, nil
+}
+
+// newUseParentTaskQueueCommands initializes (sub)commands for a test.option.v1.UseParentTaskQueue cli or command
+func newUseParentTaskQueueCommands(options ...*UseParentTaskQueueCliOptions) ([]*v2.Command, error) {
+ opts := &UseParentTaskQueueCliOptions{}
+ if len(options) > 0 {
+ opts = options[0]
+ }
+ if opts.clientForCommand == nil {
+ opts.clientForCommand = func(*v2.Context) (client.Client, error) {
+ return client.Dial(client.Options{})
+ }
+ }
+ commands := []*v2.Command{
+ {
+ Name: "test-parent-task-queue",
+ Usage: "executes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow",
+ Category: "WORKFLOWS",
+ UseShortOptionHandling: true,
+ Before: opts.before,
+ After: opts.after,
+ Flags: []v2.Flag{
+ &v2.BoolFlag{
+ Name: "detach",
+ Usage: "run workflow in the background and print workflow and execution id",
+ Aliases: []string{"d"},
+ },
+ &v2.StringFlag{
+ Name: "task-queue",
+ Usage: "task queue name",
+ Aliases: []string{"t"},
+ EnvVars: []string{"TEMPORAL_TASK_QUEUE_NAME", "TEMPORAL_TASK_QUEUE", "TASK_QUEUE_NAME", "TASK_QUEUE"},
+ Value: "use-parent-task-queue",
+ },
+ &v2.StringFlag{
+ Name: "input-file",
+ Usage: "path to json-formatted input file",
+ Aliases: []string{"f"},
+ },
+ &v2.StringSliceFlag{
+ Name: "task-queues",
+ Usage: "set the value of the operation's \"TaskQueues\" parameter",
+ Category: "INPUT",
+ },
+ &v2.Uint64Flag{
+ Name: "depth",
+ Usage: "set the value of the operation's \"Depth\" parameter",
+ Category: "INPUT",
+ },
+ },
+ Action: func(cmd *v2.Context) error {
+ tc, err := opts.clientForCommand(cmd)
+ if err != nil {
+ return fmt.Errorf("error initializing client for command: %w", err)
+ }
+ defer tc.Close()
+ c := NewUseParentTaskQueueClient(tc)
+ req, err := UnmarshalCliFlagsToTestParentTaskQueueInput(cmd)
+ if err != nil {
+ return fmt.Errorf("error unmarshalling request: %w", err)
+ }
+ opts := client.StartWorkflowOptions{}
+ if tq := cmd.String("task-queue"); tq != "" {
+ opts.TaskQueue = tq
+ }
+ run, err := c.TestParentTaskQueueAsync(cmd.Context, req, NewTestParentTaskQueueOptions().WithStartWorkflowOptions(opts))
+ if err != nil {
+ return fmt.Errorf("error starting %s workflow: %w", TestParentTaskQueueWorkflowName, err)
+ }
+ if cmd.Bool("detach") {
+ fmt.Println("success")
+ fmt.Printf("workflow id: %s\n", run.ID())
+ fmt.Printf("run id: %s\n", run.RunID())
+ return nil
+ }
+ if resp, err := run.Get(cmd.Context); err != nil {
+ return err
+ } else {
+ b, err := protojson.Marshal(resp)
+ if err != nil {
+ return fmt.Errorf("error serializing response json: %w", err)
+ }
+ var out bytes.Buffer
+ if err := json.Indent(&out, b, "", " "); err != nil {
+ return fmt.Errorf("error formatting json: %w", err)
+ }
+ fmt.Println(out.String())
+ return nil
+ }
+ },
+ },
+ }
+ if opts.worker != nil {
+ commands = append(commands, []*v2.Command{
+ {
+ Name: "worker",
+ Usage: "runs a test.option.v1.UseParentTaskQueue worker process",
+ UseShortOptionHandling: true,
+ Before: opts.before,
+ After: opts.after,
+ Action: func(cmd *v2.Context) error {
+ c, err := opts.clientForCommand(cmd)
+ if err != nil {
+ return fmt.Errorf("error initializing client for command: %w", err)
+ }
+ defer c.Close()
+ w, err := opts.worker(cmd, c)
+ if opts.worker != nil {
+ if err != nil {
+ return fmt.Errorf("error initializing worker: %w", err)
+ }
+ }
+ if err := w.Start(); err != nil {
+ return fmt.Errorf("error starting worker: %w", err)
+ }
+ defer w.Stop()
+ <-cmd.Context.Done()
+ return nil
+ },
+ },
+ }...)
+ }
+ sort.Slice(commands, func(i, j int) bool {
+ return commands[i].Name < commands[j].Name
+ })
+ return commands, nil
+}
+
+// UnmarshalCliFlagsToTestParentTaskQueueInput unmarshals a TestParentTaskQueueInput from command line flags
+func UnmarshalCliFlagsToTestParentTaskQueueInput(cmd *v2.Context) (*TestParentTaskQueueInput, error) {
+ var result TestParentTaskQueueInput
+ var hasValues bool
+ if cmd.IsSet("input-file") {
+ inputFile, err := gohomedir.Expand(cmd.String("input-file"))
+ if err != nil {
+ inputFile = cmd.String("input-file")
+ }
+ b, err := os.ReadFile(inputFile)
+ if err != nil {
+ return nil, fmt.Errorf("error reading input-file: %w", err)
+ }
+ if err := protojson.Unmarshal(b, &result); err != nil {
+ return nil, fmt.Errorf("error parsing input-file json: %w", err)
+ }
+ hasValues = true
+ }
+ if cmd.IsSet("task-queues") {
+ hasValues = true
+ var tmp TestParentTaskQueueInput
+ if err := protojson.Unmarshal([]byte(fmt.Sprintf("{\"taskQueues\":%s}", cmd.String("task-queues"))), &tmp); err != nil {
+ return nil, fmt.Errorf("error unmarshalling \"task-queues\" map flag: %w", err)
+ }
+ result.TaskQueues = tmp.TaskQueues
+ }
+ if cmd.IsSet("depth") {
+ hasValues = true
+ result.Depth = uint32(cmd.Uint64("depth"))
+ }
+ if !hasValues {
+ return nil, nil
+ }
+ return &result, nil
+}
+
+// WithUseParentTaskQueueSchemeTypes registers all UseParentTaskQueue protobuf types with the given scheme
+func WithUseParentTaskQueueSchemeTypes() scheme.Option {
+ return func(s *scheme.Scheme) {
+ s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("TestParentTaskQueueInput"))
+ s.RegisterType(File_test_option_v1_option_proto.Messages().ByName("TestParentTaskQueueOutput"))
+ }
+}
diff --git a/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go b/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go
index 1a7b191b..b001d4a6 100644
--- a/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go
+++ b/gen/test/option/v1/optionv1xns/option_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: test/option/v1/option.proto
@@ -89,6 +89,9 @@ func RegisterTestActivities(r worker.ActivityRegistry, c v1.TestClient, options
if name := testOptions.filterActivity("test.option.v1.Test.CancelWorkflow"); name != "" {
r.RegisterActivityWithOptions(a.CancelWorkflow, activity.RegisterOptions{Name: name})
}
+ if name := testOptions.filterActivity(v1.TestDefaultTaskQueueWorkflowName); name != "" {
+ r.RegisterActivityWithOptions(a.TestDefaultTaskQueue, activity.RegisterOptions{Name: name})
+ }
if name := testOptions.filterActivity(v1.WorkflowWithInputWorkflowName); name != "" {
r.RegisterActivityWithOptions(a.WorkflowWithInput, activity.RegisterOptions{Name: name})
}
@@ -97,6 +100,204 @@ func RegisterTestActivities(r worker.ActivityRegistry, c v1.TestClient, options
}
}
+// TestDefaultTaskQueueWorkflowOptions are used to configure a(n) test.option.v1.Test.TestDefaultTaskQueue workflow execution
+type TestDefaultTaskQueueWorkflowOptions struct {
+ ActivityOptions *workflow.ActivityOptions
+ Detached bool
+ HeartbeatInterval time.Duration
+ ParentClosePolicy enumsv1.ParentClosePolicy
+ StartWorkflowOptions *client.StartWorkflowOptions
+}
+
+// NewTestDefaultTaskQueueWorkflowOptions initializes a new TestDefaultTaskQueueWorkflowOptions value
+func NewTestDefaultTaskQueueWorkflowOptions() *TestDefaultTaskQueueWorkflowOptions {
+ return &TestDefaultTaskQueueWorkflowOptions{}
+}
+
+// WithActivityOptions can be used to customize the activity options
+func (opts *TestDefaultTaskQueueWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *TestDefaultTaskQueueWorkflowOptions {
+ opts.ActivityOptions = &ao
+ return opts
+}
+
+// WithDetached can be used to start a workflow execution and exit immediately
+func (opts *TestDefaultTaskQueueWorkflowOptions) WithDetached(d bool) *TestDefaultTaskQueueWorkflowOptions {
+ opts.Detached = d
+ return opts
+}
+
+// WithHeartbeatInterval can be used to customize the activity heartbeat interval
+func (opts *TestDefaultTaskQueueWorkflowOptions) WithHeartbeatInterval(d time.Duration) *TestDefaultTaskQueueWorkflowOptions {
+ opts.HeartbeatInterval = d
+ return opts
+}
+
+// WithParentClosePolicy can be used to customize the cancellation propagation behavior
+func (opts *TestDefaultTaskQueueWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *TestDefaultTaskQueueWorkflowOptions {
+ opts.ParentClosePolicy = policy
+ return opts
+}
+
+// WithStartWorkflowOptions can be used to customize the start workflow options
+func (opts *TestDefaultTaskQueueWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *TestDefaultTaskQueueWorkflowOptions {
+ opts.StartWorkflowOptions = &swo
+ return opts
+}
+
+// TestDefaultTaskQueueRun provides a handle to a test.option.v1.Test.TestDefaultTaskQueue workflow execution
+type TestDefaultTaskQueueRun interface {
+ // Cancel cancels the workflow
+ Cancel(workflow.Context) error
+
+ // Future returns the inner workflow.Future
+ Future() workflow.Future
+
+ // Get returns the inner workflow.Future
+ Get(workflow.Context) (*v1.TestDefaultTaskQueueOutput, error)
+
+ // ID returns the workflow id
+ ID() string
+}
+
+// testDefaultTaskQueueRun provides a(n) TestDefaultTaskQueueRun implementation
+type testDefaultTaskQueueRun struct {
+ cancel func()
+ future workflow.Future
+ id string
+}
+
+// Cancel the underlying workflow execution
+func (r *testDefaultTaskQueueRun) Cancel(ctx workflow.Context) error {
+ if r.cancel != nil {
+ r.cancel()
+ if _, err := r.Get(ctx); err != nil && !errors.Is(err, workflow.ErrCanceled) {
+ return err
+ }
+ return nil
+ }
+ return CancelTestWorkflow(ctx, r.id, "")
+}
+
+// Future returns the underlying activity future
+func (r *testDefaultTaskQueueRun) Future() workflow.Future {
+ return r.future
+}
+
+// Get blocks on activity completion and returns the underlying workflow result
+func (r *testDefaultTaskQueueRun) Get(ctx workflow.Context) (*v1.TestDefaultTaskQueueOutput, error) {
+ var resp v1.TestDefaultTaskQueueOutput
+ if err := r.future.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// ID returns the underlying workflow id
+func (r *testDefaultTaskQueueRun) ID() string {
+ return r.id
+}
+
+// TestDefaultTaskQueue executes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow and blocks until error or response is received
+func TestDefaultTaskQueue(ctx workflow.Context, req *v1.TestDefaultTaskQueueInput, opts ...*TestDefaultTaskQueueWorkflowOptions) (*v1.TestDefaultTaskQueueOutput, error) {
+ run, err := TestDefaultTaskQueueAsync(ctx, req, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// TestDefaultTaskQueueAsync executes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow and returns a handle to the underlying activity
+func TestDefaultTaskQueueAsync(ctx workflow.Context, req *v1.TestDefaultTaskQueueInput, opts ...*TestDefaultTaskQueueWorkflowOptions) (TestDefaultTaskQueueRun, error) {
+ activityName := testOptions.filterActivity(v1.TestDefaultTaskQueueWorkflowName)
+ if activityName == "" {
+ return nil, temporal.NewNonRetryableApplicationError(
+ fmt.Sprintf("no activity registered for %s", v1.TestDefaultTaskQueueWorkflowName),
+ "Unimplemented",
+ nil,
+ )
+ }
+
+ opt := &TestDefaultTaskQueueWorkflowOptions{}
+ if len(opts) > 0 && opts[0] != nil {
+ opt = opts[0]
+ }
+ if opt.HeartbeatInterval == 0 {
+ opt.HeartbeatInterval = time.Second * 30
+ }
+
+ // configure activity options
+ ao := workflow.GetActivityOptions(ctx)
+ if opt.ActivityOptions != nil {
+ ao = *opt.ActivityOptions
+ }
+ if ao.HeartbeatTimeout == 0 {
+ ao.HeartbeatTimeout = opt.HeartbeatInterval * 2
+ }
+ // WaitForCancellation must be set otherwise the underlying workflow is not guaranteed to be canceled
+ ao.WaitForCancellation = true
+
+ if ao.StartToCloseTimeout == 0 && ao.ScheduleToCloseTimeout == 0 {
+ ao.ScheduleToCloseTimeout = 86400000000000 // 1 day
+ }
+ ctx = workflow.WithActivityOptions(ctx, ao)
+
+ // configure start workflow options
+ wo := client.StartWorkflowOptions{}
+ if opt.StartWorkflowOptions != nil {
+ wo = *opt.StartWorkflowOptions
+ }
+ if wo.ID == "" {
+ if err := workflow.SideEffect(ctx, func(ctx workflow.Context) any {
+ id, err := uuid.NewRandom()
+ if err != nil {
+ workflow.GetLogger(ctx).Error("error generating workflow id", "error", err)
+ return nil
+ }
+ return id
+ }).Get(&wo.ID); err != nil {
+ return nil, err
+ }
+ }
+ if wo.ID == "" {
+ return nil, temporal.NewNonRetryableApplicationError("workflow id is required", "InvalidArgument", nil)
+ }
+
+ // marshal start workflow options protobuf message
+ swo, err := xns.MarshalStartWorkflowOptions(wo)
+ if err != nil {
+ return nil, fmt.Errorf("error marshalling start workflow options: %w", err)
+ }
+
+ // marshal workflow request protobuf message
+ wreq, err := anypb.New(req)
+ if err != nil {
+ return nil, fmt.Errorf("error marshalling workflow request: %w", err)
+ }
+
+ var parentClosePolicy temporalv1.ParentClosePolicy
+ switch opt.ParentClosePolicy {
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ }
+
+ ctx, cancel := workflow.WithCancel(ctx)
+ return &testDefaultTaskQueueRun{
+ cancel: cancel,
+ id: wo.ID,
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
+ Detached: opt.Detached,
+ HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
+ ParentClosePolicy: parentClosePolicy,
+ Request: wreq,
+ StartWorkflowOptions: swo,
+ }),
+ }, nil
+}
+
// WorkflowWithInputWorkflowOptions are used to configure a(n) test.option.v1.Test.WorkflowWithInput workflow execution
type WorkflowWithInputWorkflowOptions struct {
ActivityOptions *workflow.ActivityOptions
@@ -537,6 +738,89 @@ func (a *testActivities) CancelWorkflow(ctx context.Context, workflowID string,
return a.client.CancelWorkflow(ctx, workflowID, runID)
}
+// TestDefaultTaskQueue executes a(n) test.option.v1.Test.TestDefaultTaskQueue workflow via an activity
+func (a *testActivities) TestDefaultTaskQueue(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.TestDefaultTaskQueueOutput, err error) {
+ // unmarshal workflow request
+ var req v1.TestDefaultTaskQueueInput
+ if err := input.Request.UnmarshalTo(&req); err != nil {
+ return nil, testOptions.convertError(temporal.NewNonRetryableApplicationError(
+ fmt.Sprintf("error unmarshalling workflow request of type %s as github.com/cludden/protoc-gen-go-temporal/gen/test/option/v1.TestDefaultTaskQueueInput", input.Request.GetTypeUrl()),
+ "InvalidArgument",
+ err,
+ ))
+ }
+
+ // initialize workflow execution
+ var run v1.TestDefaultTaskQueueRun
+ run, err = a.client.TestDefaultTaskQueueAsync(ctx, &req, v1.NewTestDefaultTaskQueueOptions().WithStartWorkflowOptions(
+ xns.UnmarshalStartWorkflowOptions(input.GetStartWorkflowOptions()),
+ ))
+ if err != nil {
+ return nil, testOptions.convertError(err)
+ }
+
+ // exit early if detached enabled
+ if input.GetDetached() {
+ return nil, nil
+ }
+
+ // otherwise, wait for execution to complete in child goroutine
+ doneCh := make(chan struct{})
+ go func() {
+ resp, err = run.Get(ctx)
+ close(doneCh)
+ }()
+
+ heartbeatInterval := input.GetHeartbeatInterval().AsDuration()
+ if heartbeatInterval == 0 {
+ heartbeatInterval = time.Second * 30
+ }
+
+ // heartbeat activity while waiting for workflow execution to complete
+ for {
+ select {
+ // send heartbeats periodically
+ case <-time.After(heartbeatInterval):
+ activity.RecordHeartbeat(ctx, run.ID())
+
+ // return retryable error on worker close
+ case <-activity.GetWorkerStopChannel(ctx):
+ return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
+
+ // catch parent activity context cancellation. in most cases, this should indicate a
+ // server-sent cancellation, but there's a non-zero possibility that this cancellation
+ // is received due to the worker stopping, prior to detecting the closing of the worker
+ // stop channel. to give us an opportunity to detect a cancellation stemming from the
+ // worker closing, we again check to see if the worker stop channel is closed before
+ // propagating the cancellation
+ case <-ctx.Done():
+ select {
+ case <-activity.GetWorkerStopChannel(ctx):
+ return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
+ default:
+ parentClosePolicy := input.GetParentClosePolicy()
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
+ defer cancel()
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ err = run.Cancel(disconnectedCtx)
+ } else {
+ err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
+ }
+ if err != nil {
+ return nil, testOptions.convertError(err)
+ }
+ }
+ return nil, testOptions.convertError(temporal.NewCanceledError(ctx.Err().Error()))
+ }
+
+ // handle workflow completion
+ case <-doneCh:
+ return resp, testOptions.convertError(err)
+ }
+ }
+}
+
// WorkflowWithInput executes a(n) test.option.v1.Test.WorkflowWithInput workflow via an activity
func (a *testActivities) WorkflowWithInput(ctx context.Context, input *xnsv1.WorkflowRequest) (err error) {
// unmarshal workflow request
@@ -691,3 +975,384 @@ func (a *testActivities) UpdateWithInput(ctx context.Context, input *xnsv1.Updat
}
}
}
+
+// UseParentTaskQueueOptions is used to configure test.option.v1.UseParentTaskQueue xns activity registration
+type UseParentTaskQueueOptions struct {
+ // errorConverter is used to customize error
+ errorConverter func(error) error
+ // filter is used to filter xns activity registrations. It receives as
+ // input the original activity name, and should return one of the following:
+ // 1. the original activity name, for no changes
+ // 2. a modified activity name, to override the original activity name
+ // 3. an empty string, to skip registration
+ filter func(string) string
+}
+
+// NewUseParentTaskQueueOptions initializes a new UseParentTaskQueueOptions value
+func NewUseParentTaskQueueOptions() *UseParentTaskQueueOptions {
+ return &UseParentTaskQueueOptions{}
+}
+
+// WithErrorConverter overrides the default error converter applied to xns activity errors
+func (opts *UseParentTaskQueueOptions) WithErrorConverter(errorConverter func(error) error) *UseParentTaskQueueOptions {
+ opts.errorConverter = errorConverter
+ return opts
+}
+
+// Filter is used to filter registered xns activities or customize their name
+func (opts *UseParentTaskQueueOptions) WithFilter(filter func(string) string) *UseParentTaskQueueOptions {
+ opts.filter = filter
+ return opts
+}
+
+// convertError is applied to all xns activity errors
+func (opts *UseParentTaskQueueOptions) convertError(err error) error {
+ if err == nil {
+ return nil
+ }
+ if opts != nil && opts.errorConverter != nil {
+ return opts.errorConverter(err)
+ }
+ return xns.ErrorToApplicationError(err)
+}
+
+// filterActivity is used to filter xns activity registrations
+func (opts *UseParentTaskQueueOptions) filterActivity(name string) string {
+ if opts == nil || opts.filter == nil {
+ return name
+ }
+ return opts.filter(name)
+}
+
+// useParentTaskQueueOptions is a reference to the UseParentTaskQueueOptions initialized at registration
+var useParentTaskQueueOptions *UseParentTaskQueueOptions
+
+// RegisterUseParentTaskQueueActivities registers test.option.v1.UseParentTaskQueue cross-namespace activities
+func RegisterUseParentTaskQueueActivities(r worker.ActivityRegistry, c v1.UseParentTaskQueueClient, options ...*UseParentTaskQueueOptions) {
+ if useParentTaskQueueOptions == nil && len(options) > 0 && options[0] != nil {
+ useParentTaskQueueOptions = options[0]
+ }
+ a := &useParentTaskQueueActivities{c}
+ if name := useParentTaskQueueOptions.filterActivity("test.option.v1.UseParentTaskQueue.CancelWorkflow"); name != "" {
+ r.RegisterActivityWithOptions(a.CancelWorkflow, activity.RegisterOptions{Name: name})
+ }
+ if name := useParentTaskQueueOptions.filterActivity(v1.TestParentTaskQueueWorkflowName); name != "" {
+ r.RegisterActivityWithOptions(a.TestParentTaskQueue, activity.RegisterOptions{Name: name})
+ }
+}
+
+// TestParentTaskQueueWorkflowOptions are used to configure a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow execution
+type TestParentTaskQueueWorkflowOptions struct {
+ ActivityOptions *workflow.ActivityOptions
+ Detached bool
+ HeartbeatInterval time.Duration
+ ParentClosePolicy enumsv1.ParentClosePolicy
+ StartWorkflowOptions *client.StartWorkflowOptions
+}
+
+// NewTestParentTaskQueueWorkflowOptions initializes a new TestParentTaskQueueWorkflowOptions value
+func NewTestParentTaskQueueWorkflowOptions() *TestParentTaskQueueWorkflowOptions {
+ return &TestParentTaskQueueWorkflowOptions{}
+}
+
+// WithActivityOptions can be used to customize the activity options
+func (opts *TestParentTaskQueueWorkflowOptions) WithActivityOptions(ao workflow.ActivityOptions) *TestParentTaskQueueWorkflowOptions {
+ opts.ActivityOptions = &ao
+ return opts
+}
+
+// WithDetached can be used to start a workflow execution and exit immediately
+func (opts *TestParentTaskQueueWorkflowOptions) WithDetached(d bool) *TestParentTaskQueueWorkflowOptions {
+ opts.Detached = d
+ return opts
+}
+
+// WithHeartbeatInterval can be used to customize the activity heartbeat interval
+func (opts *TestParentTaskQueueWorkflowOptions) WithHeartbeatInterval(d time.Duration) *TestParentTaskQueueWorkflowOptions {
+ opts.HeartbeatInterval = d
+ return opts
+}
+
+// WithParentClosePolicy can be used to customize the cancellation propagation behavior
+func (opts *TestParentTaskQueueWorkflowOptions) WithParentClosePolicy(policy enumsv1.ParentClosePolicy) *TestParentTaskQueueWorkflowOptions {
+ opts.ParentClosePolicy = policy
+ return opts
+}
+
+// WithStartWorkflowOptions can be used to customize the start workflow options
+func (opts *TestParentTaskQueueWorkflowOptions) WithStartWorkflow(swo client.StartWorkflowOptions) *TestParentTaskQueueWorkflowOptions {
+ opts.StartWorkflowOptions = &swo
+ return opts
+}
+
+// TestParentTaskQueueRun provides a handle to a test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow execution
+type TestParentTaskQueueRun interface {
+ // Cancel cancels the workflow
+ Cancel(workflow.Context) error
+
+ // Future returns the inner workflow.Future
+ Future() workflow.Future
+
+ // Get returns the inner workflow.Future
+ Get(workflow.Context) (*v1.TestParentTaskQueueOutput, error)
+
+ // ID returns the workflow id
+ ID() string
+}
+
+// testParentTaskQueueRun provides a(n) TestParentTaskQueueRun implementation
+type testParentTaskQueueRun struct {
+ cancel func()
+ future workflow.Future
+ id string
+}
+
+// Cancel the underlying workflow execution
+func (r *testParentTaskQueueRun) Cancel(ctx workflow.Context) error {
+ if r.cancel != nil {
+ r.cancel()
+ if _, err := r.Get(ctx); err != nil && !errors.Is(err, workflow.ErrCanceled) {
+ return err
+ }
+ return nil
+ }
+ return CancelUseParentTaskQueueWorkflow(ctx, r.id, "")
+}
+
+// Future returns the underlying activity future
+func (r *testParentTaskQueueRun) Future() workflow.Future {
+ return r.future
+}
+
+// Get blocks on activity completion and returns the underlying workflow result
+func (r *testParentTaskQueueRun) Get(ctx workflow.Context) (*v1.TestParentTaskQueueOutput, error) {
+ var resp v1.TestParentTaskQueueOutput
+ if err := r.future.Get(ctx, &resp); err != nil {
+ return nil, err
+ }
+ return &resp, nil
+}
+
+// ID returns the underlying workflow id
+func (r *testParentTaskQueueRun) ID() string {
+ return r.id
+}
+
+// TestParentTaskQueue executes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and blocks until error or response is received
+func TestParentTaskQueue(ctx workflow.Context, req *v1.TestParentTaskQueueInput, opts ...*TestParentTaskQueueWorkflowOptions) (*v1.TestParentTaskQueueOutput, error) {
+ run, err := TestParentTaskQueueAsync(ctx, req, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return run.Get(ctx)
+}
+
+// TestParentTaskQueueAsync executes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow and returns a handle to the underlying activity
+func TestParentTaskQueueAsync(ctx workflow.Context, req *v1.TestParentTaskQueueInput, opts ...*TestParentTaskQueueWorkflowOptions) (TestParentTaskQueueRun, error) {
+ activityName := useParentTaskQueueOptions.filterActivity(v1.TestParentTaskQueueWorkflowName)
+ if activityName == "" {
+ return nil, temporal.NewNonRetryableApplicationError(
+ fmt.Sprintf("no activity registered for %s", v1.TestParentTaskQueueWorkflowName),
+ "Unimplemented",
+ nil,
+ )
+ }
+
+ opt := &TestParentTaskQueueWorkflowOptions{}
+ if len(opts) > 0 && opts[0] != nil {
+ opt = opts[0]
+ }
+ if opt.HeartbeatInterval == 0 {
+ opt.HeartbeatInterval = time.Second * 30
+ }
+
+ // configure activity options
+ ao := workflow.GetActivityOptions(ctx)
+ if opt.ActivityOptions != nil {
+ ao = *opt.ActivityOptions
+ }
+ if ao.HeartbeatTimeout == 0 {
+ ao.HeartbeatTimeout = opt.HeartbeatInterval * 2
+ }
+ // WaitForCancellation must be set otherwise the underlying workflow is not guaranteed to be canceled
+ ao.WaitForCancellation = true
+
+ if ao.StartToCloseTimeout == 0 && ao.ScheduleToCloseTimeout == 0 {
+ ao.ScheduleToCloseTimeout = 86400000000000 // 1 day
+ }
+ ctx = workflow.WithActivityOptions(ctx, ao)
+
+ // configure start workflow options
+ wo := client.StartWorkflowOptions{}
+ if opt.StartWorkflowOptions != nil {
+ wo = *opt.StartWorkflowOptions
+ }
+ if wo.ID == "" {
+ if err := workflow.SideEffect(ctx, func(ctx workflow.Context) any {
+ id, err := uuid.NewRandom()
+ if err != nil {
+ workflow.GetLogger(ctx).Error("error generating workflow id", "error", err)
+ return nil
+ }
+ return id
+ }).Get(&wo.ID); err != nil {
+ return nil, err
+ }
+ }
+ if wo.ID == "" {
+ return nil, temporal.NewNonRetryableApplicationError("workflow id is required", "InvalidArgument", nil)
+ }
+
+ // marshal start workflow options protobuf message
+ swo, err := xns.MarshalStartWorkflowOptions(wo)
+ if err != nil {
+ return nil, fmt.Errorf("error marshalling start workflow options: %w", err)
+ }
+
+ // marshal workflow request protobuf message
+ wreq, err := anypb.New(req)
+ if err != nil {
+ return nil, fmt.Errorf("error marshalling workflow request: %w", err)
+ }
+
+ var parentClosePolicy temporalv1.ParentClosePolicy
+ switch opt.ParentClosePolicy {
+ case enumsv1.PARENT_CLOSE_POLICY_ABANDON:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_ABANDON
+ case enumsv1.PARENT_CLOSE_POLICY_REQUEST_CANCEL:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL
+ case enumsv1.PARENT_CLOSE_POLICY_TERMINATE:
+ parentClosePolicy = temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE
+ }
+
+ ctx, cancel := workflow.WithCancel(ctx)
+ return &testParentTaskQueueRun{
+ cancel: cancel,
+ id: wo.ID,
+ future: workflow.ExecuteActivity(ctx, activityName, &xnsv1.WorkflowRequest{
+ Detached: opt.Detached,
+ HeartbeatInterval: durationpb.New(opt.HeartbeatInterval),
+ ParentClosePolicy: parentClosePolicy,
+ Request: wreq,
+ StartWorkflowOptions: swo,
+ }),
+ }, nil
+}
+
+// CancelUseParentTaskQueueWorkflow cancels an existing workflow
+func CancelUseParentTaskQueueWorkflow(ctx workflow.Context, workflowID string, runID string) error {
+ return CancelUseParentTaskQueueWorkflowAsync(ctx, workflowID, runID).Get(ctx, nil)
+}
+
+// CancelUseParentTaskQueueWorkflowAsync cancels an existing workflow
+func CancelUseParentTaskQueueWorkflowAsync(ctx workflow.Context, workflowID string, runID string) workflow.Future {
+ activityName := useParentTaskQueueOptions.filterActivity("test.option.v1.UseParentTaskQueue.CancelWorkflow")
+ if activityName == "" {
+ f, s := workflow.NewFuture(ctx)
+ s.SetError(temporal.NewNonRetryableApplicationError(
+ "no activity registered for test.option.v1.UseParentTaskQueue.CancelWorkflow",
+ "Unimplemented",
+ nil,
+ ))
+ return f
+ }
+ ao := workflow.GetActivityOptions(ctx)
+ if ao.StartToCloseTimeout == 0 && ao.ScheduleToCloseTimeout == 0 {
+ ao.StartToCloseTimeout = time.Minute
+ }
+ ctx = workflow.WithActivityOptions(ctx, ao)
+ return workflow.ExecuteActivity(ctx, activityName, workflowID, runID)
+}
+
+// useParentTaskQueueActivities provides activities that can be used to interact with a(n) UseParentTaskQueue service's workflow, queries, signals, and updates across namespaces
+type useParentTaskQueueActivities struct {
+ client v1.UseParentTaskQueueClient
+}
+
+// CancelWorkflow cancels an existing workflow execution
+func (a *useParentTaskQueueActivities) CancelWorkflow(ctx context.Context, workflowID string, runID string) error {
+ return a.client.CancelWorkflow(ctx, workflowID, runID)
+}
+
+// TestParentTaskQueue executes a(n) test.option.v1.UseParentTaskQueue.TestParentTaskQueue workflow via an activity
+func (a *useParentTaskQueueActivities) TestParentTaskQueue(ctx context.Context, input *xnsv1.WorkflowRequest) (resp *v1.TestParentTaskQueueOutput, err error) {
+ // unmarshal workflow request
+ var req v1.TestParentTaskQueueInput
+ if err := input.Request.UnmarshalTo(&req); err != nil {
+ return nil, useParentTaskQueueOptions.convertError(temporal.NewNonRetryableApplicationError(
+ fmt.Sprintf("error unmarshalling workflow request of type %s as github.com/cludden/protoc-gen-go-temporal/gen/test/option/v1.TestParentTaskQueueInput", input.Request.GetTypeUrl()),
+ "InvalidArgument",
+ err,
+ ))
+ }
+
+ // initialize workflow execution
+ var run v1.TestParentTaskQueueRun
+ run, err = a.client.TestParentTaskQueueAsync(ctx, &req, v1.NewTestParentTaskQueueOptions().WithStartWorkflowOptions(
+ xns.UnmarshalStartWorkflowOptions(input.GetStartWorkflowOptions()),
+ ))
+ if err != nil {
+ return nil, useParentTaskQueueOptions.convertError(err)
+ }
+
+ // exit early if detached enabled
+ if input.GetDetached() {
+ return nil, nil
+ }
+
+ // otherwise, wait for execution to complete in child goroutine
+ doneCh := make(chan struct{})
+ go func() {
+ resp, err = run.Get(ctx)
+ close(doneCh)
+ }()
+
+ heartbeatInterval := input.GetHeartbeatInterval().AsDuration()
+ if heartbeatInterval == 0 {
+ heartbeatInterval = time.Second * 30
+ }
+
+ // heartbeat activity while waiting for workflow execution to complete
+ for {
+ select {
+ // send heartbeats periodically
+ case <-time.After(heartbeatInterval):
+ activity.RecordHeartbeat(ctx, run.ID())
+
+ // return retryable error on worker close
+ case <-activity.GetWorkerStopChannel(ctx):
+ return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
+
+ // catch parent activity context cancellation. in most cases, this should indicate a
+ // server-sent cancellation, but there's a non-zero possibility that this cancellation
+ // is received due to the worker stopping, prior to detecting the closing of the worker
+ // stop channel. to give us an opportunity to detect a cancellation stemming from the
+ // worker closing, we again check to see if the worker stop channel is closed before
+ // propagating the cancellation
+ case <-ctx.Done():
+ select {
+ case <-activity.GetWorkerStopChannel(ctx):
+ return nil, temporal.NewApplicationError("worker is stopping", "WorkerStopped")
+ default:
+ parentClosePolicy := input.GetParentClosePolicy()
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL || parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_TERMINATE {
+ disconnectedCtx, cancel := context.WithTimeout(context.Background(), time.Minute)
+ defer cancel()
+ if parentClosePolicy == temporalv1.ParentClosePolicy_PARENT_CLOSE_POLICY_REQUEST_CANCEL {
+ err = run.Cancel(disconnectedCtx)
+ } else {
+ err = run.Terminate(disconnectedCtx, "xns activity cancellation received", "error", ctx.Err())
+ }
+ if err != nil {
+ return nil, useParentTaskQueueOptions.convertError(err)
+ }
+ }
+ return nil, useParentTaskQueueOptions.convertError(temporal.NewCanceledError(ctx.Err().Error()))
+ }
+
+ // handle workflow completion
+ case <-doneCh:
+ return resp, useParentTaskQueueOptions.convertError(err)
+ }
+ }
+}
diff --git a/gen/test/simple/v1/simple_temporal.pb.go b/gen/test/simple/v1/simple_temporal.pb.go
index 518d54c4..0b944112 100644
--- a/gen/test/simple/v1/simple_temporal.pb.go
+++ b/gen/test/simple/v1/simple_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: test/simple/v1/simple.proto
diff --git a/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go b/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go
index f92b52f9..bd9419fb 100644
--- a/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go
+++ b/gen/test/simple/v1/v1xns/simple_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: test/simple/v1/simple.proto
diff --git a/gen/test/xnserr/v1/xnserr_temporal.pb.go b/gen/test/xnserr/v1/xnserr_temporal.pb.go
index 298f44fe..562c4868 100644
--- a/gen/test/xnserr/v1/xnserr_temporal.pb.go
+++ b/gen/test/xnserr/v1/xnserr_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: test/xnserr/v1/xnserr.proto
diff --git a/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go b/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go
index 8bd6dd0f..26673784 100644
--- a/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go
+++ b/gen/test/xnserr/v1/xnserrv1xns/xnserr_xns_temporal.pb.go
@@ -1,8 +1,8 @@
// Code generated by protoc-gen-go_temporal. DO NOT EDIT.
// versions:
//
-// protoc-gen-go_temporal 1.14.3-next (974fdc3d78b6359d0e967899ac581d33b6a0bc71)
-// go go1.22.2
+// protoc-gen-go_temporal 1.14.4-next (d2f9bfc0a16171313109a7b80bc10fabc41196e0)
+// go go1.22.6
// protoc (unknown)
//
// source: test/xnserr/v1/xnserr.proto
diff --git a/internal/plugin/client.go b/internal/plugin/client.go
index 8ee4047f..4e909cab 100644
--- a/internal/plugin/client.go
+++ b/internal/plugin/client.go
@@ -1472,10 +1472,12 @@ func (svc *Manifest) genWorkflowOptions(f *g.File, workflow protoreflect.FullNam
g.Id("opts").Dot("TaskQueue").Op("=").Op("*").Id("v"),
).Else().If(g.Id("opts").Dot("TaskQueue").Op("==").Lit("")).BlockFunc(func(bl *g.Group) {
var taskQueueVar g.Code
- if tq := opts.GetTaskQueue(); tq != "" {
- taskQueueVar = g.Lit(tq)
- } else if tq = svc.opts.GetTaskQueue(); tq != "" {
- taskQueueVar = g.Id(svc.toCamel("%sTaskQueue", svc.Service.GoName))
+ if !child || !svc.opts.GetEnableParentTaskQueueForChildWorkflows() {
+ if tq := opts.GetTaskQueue(); tq != "" {
+ taskQueueVar = g.Lit(tq)
+ } else if tq = svc.opts.GetTaskQueue(); tq != "" {
+ taskQueueVar = g.Id(svc.toCamel("%sTaskQueue", svc.Service.GoName))
+ }
}
if taskQueueVar != nil {
bl.Id("opts").Dot("TaskQueue").Op("=").Add(taskQueueVar)
diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go
index e8b48111..64dd48d7 100644
--- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go
+++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_CreateFooRun.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package examplev1
diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go
index ca94b1ac..73f8a8ac 100644
--- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go
+++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_ExampleClient.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package examplev1
diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go
index aa874a75..cfd27205 100644
--- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go
+++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/example/v1/mock_UpdateFooProgressHandle.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package examplev1
diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go
index 33af9d9a..33eef9aa 100644
--- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go
+++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/simple/v1/mock_SimpleWorkflowFunctions.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package v1
diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go
index 276e2ff4..09f52b87 100644
--- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go
+++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_ServerClient.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package xnserrv1mocks
diff --git a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go
index 9d0d5313..0417e731 100644
--- a/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go
+++ b/mocks/github.com/cludden/protoc-gen-go-temporal/gen/test/xnserr/v1/mock_SleepRun.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package xnserrv1mocks
diff --git a/mocks/go.temporal.io/sdk/client/mock_Client.go b/mocks/go.temporal.io/sdk/client/mock_Client.go
index fa0424c1..cd9eb8b8 100644
--- a/mocks/go.temporal.io/sdk/client/mock_Client.go
+++ b/mocks/go.temporal.io/sdk/client/mock_Client.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package client
diff --git a/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go b/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go
index e74ebcb5..0500b300 100644
--- a/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go
+++ b/mocks/go.temporal.io/sdk/clientutils/mock_WorkflowRun.go
@@ -1,4 +1,4 @@
-// Code generated by mockery v2.43.2. DO NOT EDIT.
+// Code generated by mockery v2.44.1. DO NOT EDIT.
package clientutils
diff --git a/proto/README.md b/proto/README.md
index 6fb50010..3f0ab6ea 100644
--- a/proto/README.md
+++ b/proto/README.md
@@ -197,14 +197,22 @@
- Services
- [test.option.v1.Test](#test-option-v1-test)
- [Workflows](#test-option-v1-test-workflows)
+ - [test.option.v1.Test.TestDefaultTaskQueue](#test-option-v1-test-testdefaulttaskqueue-workflow)
- [test.option.v1.Test.WorkflowWithInput](#test-option-v1-test-workflowwithinput-workflow)
- [Updates](#test-option-v1-test-updates)
- [test.option.v1.Test.UpdateWithInput](#test-option-v1-test-updatewithinput-update)
- [Activities](#test-option-v1-test-activities)
- [test.option.v1.Test.ActivityWithInput](#test-option-v1-test-activitywithinput-activity)
+ - [test.option.v1.UseParentTaskQueue](#test-option-v1-useparenttaskqueue)
+ - [Workflows](#test-option-v1-useparenttaskqueue-workflows)
+ - [test.option.v1.UseParentTaskQueue.TestParentTaskQueue](#test-option-v1-useparenttaskqueue-testparenttaskqueue-workflow)
- Messages
- [test.option.v1.ActivityWithInputRequest](#test-option-v1-activitywithinputrequest)
- [test.option.v1.ActivityWithInputResponse](#test-option-v1-activitywithinputresponse)
+ - [test.option.v1.TestDefaultTaskQueueInput](#test-option-v1-testdefaulttaskqueueinput)
+ - [test.option.v1.TestDefaultTaskQueueOutput](#test-option-v1-testdefaulttaskqueueoutput)
+ - [test.option.v1.TestParentTaskQueueInput](#test-option-v1-testparenttaskqueueinput)
+ - [test.option.v1.TestParentTaskQueueOutput](#test-option-v1-testparenttaskqueueoutput)
- [test.option.v1.UpdateWithInputRequest](#test-option-v1-updatewithinputrequest)
- [test.option.v1.WorkflowWithInputRequest](#test-option-v1-workflowwithinputrequest)
- [test.xnserr.v1](#test-xnserr-v1)
@@ -4190,6 +4198,57 @@ go_name: Blah
### Workflows
+---
+
+### test.option.v1.Test.TestDefaultTaskQueue
+
+**Input:** [test.option.v1.TestDefaultTaskQueueInput](#test-option-v1-testdefaulttaskqueueinput)
+
+
+
+Attribute |
+Type |
+Description |
+
+
+depth |
+uint32 |
+
+json_name: depth
+go_name: Depth |
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+**Output:** [test.option.v1.TestDefaultTaskQueueOutput](#test-option-v1-testdefaulttaskqueueoutput)
+
+
+
+Attribute |
+Type |
+Description |
+
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+**Defaults:**
+
+
+Name | Value |
+id_reuse_policy | WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED
|
+
+
---
### test.option.v1.Test.WorkflowWithInput
@@ -4322,6 +4381,63 @@ go_name: Result
task_queue | option-v2 |
+
+## test.option.v1.UseParentTaskQueue
+
+
+### Workflows
+
+---
+
+### test.option.v1.UseParentTaskQueue.TestParentTaskQueue
+
+**Input:** [test.option.v1.TestParentTaskQueueInput](#test-option-v1-testparenttaskqueueinput)
+
+
+
+Attribute |
+Type |
+Description |
+
+
+depth |
+uint32 |
+
+json_name: depth
+go_name: Depth |
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+**Output:** [test.option.v1.TestParentTaskQueueOutput](#test-option-v1-testparenttaskqueueoutput)
+
+
+
+Attribute |
+Type |
+Description |
+
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+**Defaults:**
+
+
+Name | Value |
+id_reuse_policy | WORKFLOW_ID_REUSE_POLICY_UNSPECIFIED
|
+
+
## Messages
@@ -4365,6 +4481,98 @@ go_name: Result
+
+### test.option.v1.TestDefaultTaskQueueInput
+
+
+
+Attribute |
+Type |
+Description |
+
+
+depth |
+uint32 |
+
+json_name: depth
+go_name: Depth |
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+
+
+
+### test.option.v1.TestDefaultTaskQueueOutput
+
+
+
+Attribute |
+Type |
+Description |
+
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+
+
+
+### test.option.v1.TestParentTaskQueueInput
+
+
+
+Attribute |
+Type |
+Description |
+
+
+depth |
+uint32 |
+
+json_name: depth
+go_name: Depth |
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+
+
+
+### test.option.v1.TestParentTaskQueueOutput
+
+
+
+Attribute |
+Type |
+Description |
+
+
+task_queues |
+string |
+
+json_name: taskQueues
+go_name: TaskQueues |
+
+
+
+
+
### test.option.v1.UpdateWithInputRequest
diff --git a/proto/temporal/v1/temporal.proto b/proto/temporal/v1/temporal.proto
index 773c0f34..d9bf7d22 100644
--- a/proto/temporal/v1/temporal.proto
+++ b/proto/temporal/v1/temporal.proto
@@ -150,6 +150,9 @@ message RetryPolicy {
// ServiceOptions provides options that can be used to define common configuration
// shared by all methods
message ServiceOptions {
+ // Use parent workflow task queue for child workflows instead of the configured default
+ bool enable_parent_task_queue_for_child_workflows = 4;
+
// Configure patches, by default, patches are introduced in enabled mode
repeated Patch patches = 3;
diff --git a/test/option/main.go b/test/option/main.go
index a7a6b34a..a1c4efdb 100644
--- a/test/option/main.go
+++ b/test/option/main.go
@@ -8,16 +8,39 @@ import (
)
type (
- Workflows struct{}
+ TestWorkflows struct{}
- Activities struct{}
+ TestActivities struct{}
+
+ TestDefaultTaskQueueWorkflow struct {
+ *optionv1.TestDefaultTaskQueueWorkflowInput
+ }
WorkflowWithInputWorkflow struct {
*optionv1.WorkflowWithInputWorkflowInput
}
)
-func (w *Workflows) WorkflowWithInput(ctx workflow.Context, input *optionv1.WorkflowWithInputWorkflowInput) (optionv1.WorkflowWithInputWorkflow, error) {
+func (w *TestWorkflows) TestDefaultTaskQueue(ctx workflow.Context, input *optionv1.TestDefaultTaskQueueWorkflowInput) (optionv1.TestDefaultTaskQueueWorkflow, error) {
+ return &TestDefaultTaskQueueWorkflow{input}, nil
+}
+
+func (w *TestDefaultTaskQueueWorkflow) Execute(ctx workflow.Context) (*optionv1.TestDefaultTaskQueueOutput, error) {
+ taskQueues := append(w.Req.GetTaskQueues(), workflow.GetInfo(ctx).TaskQueueName)
+ if w.Req.GetDepth() > 0 {
+ out, err := optionv1.TestParentTaskQueueChild(ctx, &optionv1.TestParentTaskQueueInput{
+ Depth: w.Req.GetDepth() - 1,
+ TaskQueues: taskQueues,
+ })
+ if err != nil {
+ return nil, err
+ }
+ taskQueues = out.GetTaskQueues()
+ }
+ return &optionv1.TestDefaultTaskQueueOutput{TaskQueues: taskQueues}, nil
+}
+
+func (w *TestWorkflows) WorkflowWithInput(ctx workflow.Context, input *optionv1.WorkflowWithInputWorkflowInput) (optionv1.WorkflowWithInputWorkflow, error) {
return &WorkflowWithInputWorkflow{input}, nil
}
@@ -29,6 +52,33 @@ func (w *WorkflowWithInputWorkflow) UpdateWithInput(ctx workflow.Context, input
return nil
}
-func (a *Activities) ActivityWithInput(ctx context.Context, input *optionv1.ActivityWithInputRequest) (*optionv1.ActivityWithInputResponse, error) {
+func (a *TestActivities) ActivityWithInput(ctx context.Context, input *optionv1.ActivityWithInputRequest) (*optionv1.ActivityWithInputResponse, error) {
return nil, nil
}
+
+type (
+ UseParentTaskQueueWorkflows struct{}
+
+ TestParentTaskQueueWorkflow struct {
+ *optionv1.TestParentTaskQueueWorkflowInput
+ }
+)
+
+func (w *UseParentTaskQueueWorkflows) TestParentTaskQueue(ctx workflow.Context, input *optionv1.TestParentTaskQueueWorkflowInput) (optionv1.TestParentTaskQueueWorkflow, error) {
+ return &TestParentTaskQueueWorkflow{input}, nil
+}
+
+func (w *TestParentTaskQueueWorkflow) Execute(ctx workflow.Context) (*optionv1.TestParentTaskQueueOutput, error) {
+ taskQueues := append(w.Req.GetTaskQueues(), workflow.GetInfo(ctx).TaskQueueName)
+ if w.Req.GetDepth() > 0 {
+ out, err := optionv1.TestDefaultTaskQueueChild(ctx, &optionv1.TestDefaultTaskQueueInput{
+ Depth: w.Req.GetDepth() - 1,
+ TaskQueues: taskQueues,
+ })
+ if err != nil {
+ return nil, err
+ }
+ taskQueues = out.GetTaskQueues()
+ }
+ return &optionv1.TestParentTaskQueueOutput{TaskQueues: taskQueues}, nil
+}
diff --git a/test/option/main_test.go b/test/option/main_test.go
index fdb46451..63026c68 100644
--- a/test/option/main_test.go
+++ b/test/option/main_test.go
@@ -1,16 +1,19 @@
package main
import (
+ "context"
"fmt"
"testing"
"time"
optionv1 "github.com/cludden/protoc-gen-go-temporal/gen/test/option/v1"
+ "github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
"go.temporal.io/api/enums/v1"
"go.temporal.io/sdk/client"
"go.temporal.io/sdk/temporal"
"go.temporal.io/sdk/testsuite"
+ "go.temporal.io/sdk/worker"
"go.temporal.io/sdk/workflow"
"google.golang.org/protobuf/proto"
)
@@ -28,7 +31,7 @@ func TestOptionSuite(t *testing.T) {
func (s *OptionSuite) SetupTest() {
s.env = s.NewTestWorkflowEnvironment()
- s.client = optionv1.NewTestTestClient(s.env, &Workflows{}, &Activities{})
+ s.client = optionv1.NewTestTestClient(s.env, &TestWorkflows{}, &TestActivities{})
}
func (s *OptionSuite) SetupSubTest() {
@@ -622,3 +625,40 @@ func (s *OptionSuite) TestWorkflowOptions() {
}
}
}
+
+func TestParentTaskQueue(t *testing.T) {
+ if testing.Short() {
+ t.SkipNow()
+ }
+ r := require.New(t)
+
+ srv, err := testsuite.StartDevServer(context.Background(), testsuite.DevServerOptions{})
+ r.NoError(err)
+ t.Cleanup(func() { r.NoError(srv.Stop()) })
+
+ c := srv.Client()
+ t.Cleanup(c.Close)
+
+ w1 := worker.New(c, optionv1.TestTaskQueue, worker.Options{})
+ optionv1.RegisterTestWorkflows(w1, &TestWorkflows{})
+ optionv1.RegisterTestActivities(w1, &TestActivities{})
+ optionv1.RegisterUseParentTaskQueueWorkflows(w1, &UseParentTaskQueueWorkflows{})
+ r.NoError(w1.Start())
+ t.Cleanup(w1.Stop)
+
+ w2 := worker.New(c, optionv1.UseParentTaskQueueTaskQueue, worker.Options{})
+ optionv1.RegisterUseParentTaskQueueWorkflows(w2, &UseParentTaskQueueWorkflows{})
+ r.NoError(w2.Start())
+ t.Cleanup(w2.Stop)
+
+ out, err := optionv1.NewUseParentTaskQueueClient(c).TestParentTaskQueue(context.Background(), &optionv1.TestParentTaskQueueInput{
+ Depth: 3,
+ })
+ r.NoError(err)
+ r.Equal([]string{
+ optionv1.UseParentTaskQueueTaskQueue,
+ optionv1.TestTaskQueue,
+ optionv1.TestTaskQueue,
+ optionv1.TestTaskQueue,
+ }, out.GetTaskQueues())
+}
diff --git a/test/option/proto/test/option/v1/option.proto b/test/option/proto/test/option/v1/option.proto
index c733c2e1..36394d27 100644
--- a/test/option/proto/test/option/v1/option.proto
+++ b/test/option/proto/test/option/v1/option.proto
@@ -30,6 +30,10 @@ service Test {
};
}
+ rpc TestDefaultTaskQueue(TestDefaultTaskQueueInput) returns (TestDefaultTaskQueueOutput) {
+ option (temporal.v1.workflow) = {};
+ }
+
rpc WorkflowWithInput(WorkflowWithInputRequest) returns (google.protobuf.Empty) {
option (temporal.v1.workflow) = {
execution_timeout: { seconds: 600 }
@@ -63,6 +67,35 @@ message UpdateWithInputRequest {
string name = 1;
}
+message TestDefaultTaskQueueInput {
+ repeated string task_queues = 1;
+ uint32 depth = 2;
+}
+
+message TestDefaultTaskQueueOutput {
+ repeated string task_queues = 1;
+}
+
message WorkflowWithInputRequest {
string name = 1;
}
+
+service UseParentTaskQueue {
+ option (temporal.v1.service) = {
+ task_queue: "use-parent-task-queue"
+ enable_parent_task_queue_for_child_workflows: true
+ };
+
+ rpc TestParentTaskQueue(TestParentTaskQueueInput) returns (TestParentTaskQueueOutput) {
+ option (temporal.v1.workflow) = {};
+ }
+}
+
+message TestParentTaskQueueInput {
+ repeated string task_queues = 1;
+ uint32 depth = 2;
+}
+
+message TestParentTaskQueueOutput {
+ repeated string task_queues = 1;
+}
diff --git a/test/xnserr/client_test.go b/test/xnserr/client_test.go
index caf845dc..fc4107e1 100644
--- a/test/xnserr/client_test.go
+++ b/test/xnserr/client_test.go
@@ -173,7 +173,7 @@ func (s *XnsErrSuite) TestWorkflowExecutionError_ClientCanceled() {
err = run.Get(s.ctx)
var cancelledErr *temporal.CanceledError
- s.require.ErrorAs(err, &cancelledErr)
+ s.require.ErrorContains(err, cancelledErr.Error())
execs, err := s.sc.WorkflowService().ListClosedWorkflowExecutions(s.ctx, &workflowservice.ListClosedWorkflowExecutionsRequest{
Namespace: "xnserr-server",