File tree Expand file tree Collapse file tree 4 files changed +19
-5
lines changed
Expand file tree Collapse file tree 4 files changed +19
-5
lines changed Original file line number Diff line number Diff line change @@ -446,7 +446,7 @@ typedef struct TemporalCoreTelemetryOptions {
446446
447447typedef struct TemporalCoreRuntimeOptions {
448448 const struct TemporalCoreTelemetryOptions * telemetry ;
449- uint64_t worker_heartbeat_duration_millis ;
449+ uint64_t worker_heartbeat_interval_millis ;
450450} TemporalCoreRuntimeOptions ;
451451
452452typedef struct TemporalCoreTestServerOptions {
@@ -785,6 +785,7 @@ typedef struct TemporalCoreWorkerOptions {
785785 struct TemporalCorePollerBehavior nexus_task_poller_behavior ;
786786 bool nondeterminism_as_workflow_fail ;
787787 struct TemporalCoreByteArrayRefArray nondeterminism_as_workflow_fail_for_types ;
788+ struct TemporalCoreByteArrayRefArray plugins ;
788789} TemporalCoreWorkerOptions ;
789790
790791/**
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ use url::Url;
3131#[ repr( C ) ]
3232pub struct RuntimeOptions {
3333 pub telemetry : * const TelemetryOptions ,
34- pub worker_heartbeat_duration_millis : u64 ,
34+ pub worker_heartbeat_interval_millis : u64 ,
3535}
3636
3737#[ repr( C ) ]
@@ -240,11 +240,11 @@ impl Runtime {
240240 CoreTelemetryOptions :: default ( )
241241 } ;
242242
243- let heartbeat_interval = if options. worker_heartbeat_duration_millis == 0 {
243+ let heartbeat_interval = if options. worker_heartbeat_interval_millis == 0 {
244244 None
245245 } else {
246246 Some ( Duration :: from_millis (
247- options. worker_heartbeat_duration_millis ,
247+ options. worker_heartbeat_interval_millis ,
248248 ) )
249249 } ;
250250
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ impl Context {
153153
154154 let RuntimeOrFail { runtime, fail } = temporal_core_runtime_new ( & RuntimeOptions {
155155 telemetry : std:: ptr:: null ( ) ,
156- worker_heartbeat_duration_millis : 0 ,
156+ worker_heartbeat_interval_millis : 0 ,
157157 } ) ;
158158
159159 if let Some ( fail) = byte_array_to_string ( runtime, fail) {
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ pub struct WorkerOptions {
5656 pub nexus_task_poller_behavior : PollerBehavior ,
5757 pub nondeterminism_as_workflow_fail : bool ,
5858 pub nondeterminism_as_workflow_fail_for_types : ByteArrayRefArray ,
59+ pub plugins : ByteArrayRefArray ,
5960}
6061
6162#[ repr( C ) ]
@@ -1257,6 +1258,18 @@ impl TryFrom<&WorkerOptions> for temporalio_sdk_core::WorkerConfig {
12571258 } )
12581259 . collect :: < HashMap < String , HashSet < WorkflowErrorType > > > ( ) ,
12591260 )
1261+ . plugins (
1262+ opt. plugins
1263+ . to_str_vec ( )
1264+ . into_iter ( )
1265+ . map (
1266+ |name| temporalio_common:: protos:: temporal:: api:: worker:: v1:: PluginInfo {
1267+ name : name. to_owned ( ) ,
1268+ version : String :: new ( ) ,
1269+ } ,
1270+ )
1271+ . collect :: < Vec < _ > > ( ) ,
1272+ )
12601273 . build ( )
12611274 . map_err ( |err| anyhow:: anyhow!( err) )
12621275 }
You can’t perform that action at this time.
0 commit comments