Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 6 additions & 72 deletions temporalio/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion temporalio/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@ license = "MIT"
license-file = "LICENSE"

[workspace.dependencies]
bon = { version = "3", features = ["implied-bounds"] }
derive_builder = "0.20"
derive_more = { version = "2.0", features = ["constructor", "display", "from", "into", "debug", "try_into"] }
derive_more = { version = "2.0", features = [
"constructor",
"display",
"from",
"into",
"debug",
"try_into",
] }
thiserror = "2"
tonic = "0.14"
tonic-prost = "0.14"
Expand Down
2 changes: 1 addition & 1 deletion temporalio/ext/sdk-core
70 changes: 70 additions & 0 deletions temporalio/ext/src/client_rpc_generated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ impl Client {
) -> Result<(), Error> {
match service {
SERVICE_WORKFLOW => match call.rpc.as_str() {
"count_activity_executions" => rpc_call!(
self,
callback,
call,
WorkflowService,
count_activity_executions
),
"count_workflow_executions" => rpc_call!(
self,
callback,
Expand All @@ -31,6 +38,13 @@ impl Client {
"create_workflow_rule" => {
rpc_call!(self, callback, call, WorkflowService, create_workflow_rule)
}
"delete_activity_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
delete_activity_execution
),
"delete_schedule" => {
rpc_call!(self, callback, call, WorkflowService, delete_schedule)
}
Expand Down Expand Up @@ -61,6 +75,13 @@ impl Client {
"deprecate_namespace" => {
rpc_call!(self, callback, call, WorkflowService, deprecate_namespace)
}
"describe_activity_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
describe_activity_execution
),
"describe_batch_operation" => rpc_call!(
self,
callback,
Expand Down Expand Up @@ -179,6 +200,13 @@ impl Client {
WorkflowService,
get_workflow_execution_history_reverse
),
"list_activity_executions" => rpc_call!(
self,
callback,
call,
WorkflowService,
list_activity_executions
),
"list_archived_workflow_executions" => rpc_call!(
self,
callback,
Expand Down Expand Up @@ -250,6 +278,20 @@ impl Client {
"pause_activity" => {
rpc_call!(self, callback, call, WorkflowService, pause_activity)
}
"pause_workflow_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
pause_workflow_execution
),
"poll_activity_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
poll_activity_execution
),
"poll_activity_task_queue" => rpc_call!(
self,
callback,
Expand Down Expand Up @@ -301,6 +343,13 @@ impl Client {
"register_namespace" => {
rpc_call!(self, callback, call, WorkflowService, register_namespace)
}
"request_cancel_activity_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
request_cancel_activity_execution
),
"request_cancel_workflow_execution" => rpc_call!(
self,
callback,
Expand Down Expand Up @@ -454,6 +503,13 @@ impl Client {
WorkflowService,
signal_workflow_execution
),
"start_activity_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
start_activity_execution
),
"start_batch_operation" => {
rpc_call!(self, callback, call, WorkflowService, start_batch_operation)
}
Expand All @@ -467,6 +523,13 @@ impl Client {
"stop_batch_operation" => {
rpc_call!(self, callback, call, WorkflowService, stop_batch_operation)
}
"terminate_activity_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
terminate_activity_execution
),
"terminate_workflow_execution" => rpc_call!(
self,
callback,
Expand All @@ -480,6 +543,13 @@ impl Client {
"unpause_activity" => {
rpc_call!(self, callback, call, WorkflowService, unpause_activity)
}
"unpause_workflow_execution" => rpc_call!(
self,
callback,
call,
WorkflowService,
unpause_workflow_execution
),
"update_activity_options" => rpc_call!(
self,
callback,
Expand Down
15 changes: 5 additions & 10 deletions temporalio/ext/src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,11 @@ fn build_metric_parameters(
description: Option<String>,
unit: Option<String>,
) -> metrics::MetricParameters {
let mut build = metrics::MetricParametersBuilder::default();
build.name(name);
if let Some(description) = description {
build.description(description);
}
if let Some(unit) = unit {
build.unit(unit);
}
// Should be nothing that would fail validation here
build.build().unwrap()
metrics::MetricParameters::builder()
.name(name)
.maybe_description(description)
.maybe_unit(unit)
.build()
}

fn metric_key_values(hash: RHash) -> Result<Vec<metrics::MetricKeyValue>, Error> {
Expand Down
Loading
Loading