Skip to content

Commit 24e3310

Browse files
elena-kolevskazedgell
authored andcommitted
Updates protos from release-1.13.0 (dapr#120)
* Updates protos from release-1.13.0 Signed-off-by: Elena Kolevska <[email protected]> * Now from the correct version Signed-off-by: Elena Kolevska <[email protected]> * uses GetMetadataRequest Signed-off-by: Elena Kolevska <[email protected]> --------- Signed-off-by: Elena Kolevska <[email protected]> Signed-off-by: Zachary Edgell <[email protected]>
1 parent b613923 commit 24e3310

File tree

2 files changed

+41
-18
lines changed

2 files changed

+41
-18
lines changed

dapr/proto/runtime/v1/dapr.proto

+37-17
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ service Dapr {
7979
// Unregister an actor reminder.
8080
rpc UnregisterActorReminder(UnregisterActorReminderRequest) returns (google.protobuf.Empty) {}
8181

82-
// Rename an actor reminder.
83-
rpc RenameActorReminder(RenameActorReminderRequest) returns (google.protobuf.Empty) {}
84-
8582
// Gets the state for a specific actor.
8683
rpc GetActorState(GetActorStateRequest) returns (GetActorStateResponse) {}
8784

@@ -122,7 +119,7 @@ service Dapr {
122119
rpc DecryptAlpha1(stream DecryptRequest) returns (stream DecryptResponse);
123120

124121
// Gets metadata of the sidecar
125-
rpc GetMetadata (google.protobuf.Empty) returns (GetMetadataResponse) {}
122+
rpc GetMetadata (GetMetadataRequest) returns (GetMetadataResponse) {}
126123

127124
// Sets value in extended metadata of the sidecar
128125
rpc SetMetadata (SetMetadataRequest) returns (google.protobuf.Empty) {}
@@ -190,7 +187,7 @@ service Dapr {
190187
// Raise an event to a running workflow instance
191188
rpc RaiseEventWorkflowBeta1 (RaiseEventWorkflowRequest) returns (google.protobuf.Empty) {}
192189
// Shutdown the sidecar
193-
rpc Shutdown (google.protobuf.Empty) returns (google.protobuf.Empty) {}
190+
rpc Shutdown (ShutdownRequest) returns (google.protobuf.Empty) {}
194191
}
195192

196193
// InvokeServiceRequest represents the request message for Service invocation.
@@ -407,15 +404,13 @@ message BulkPublishResponse {
407404

408405
// BulkPublishResponseFailedEntry is the message containing the entryID and error of a failed event in BulkPublishEvent call
409406
message BulkPublishResponseFailedEntry {
410-
411407
// The response scoped unique ID referring to this message
412408
string entry_id = 1;
413409

414410
// The error message if any on failure
415411
string error = 2;
416412
}
417413

418-
419414
// InvokeBindingRequest is the message to send data to output bindings
420415
message InvokeBindingRequest {
421416
// The name of the output binding to invoke.
@@ -544,14 +539,6 @@ message UnregisterActorReminderRequest {
544539
string name = 3;
545540
}
546541

547-
// RenameActorReminderRequest is the message to rename an actor reminder.
548-
message RenameActorReminderRequest {
549-
string actor_type = 1;
550-
string actor_id = 2;
551-
string old_name = 3;
552-
string new_name = 4;
553-
}
554-
555542
// GetActorStateRequest is the message to get key-value states from specific actor.
556543
message GetActorStateRequest {
557544
string actor_type = 1;
@@ -600,17 +587,45 @@ message InvokeActorResponse {
600587
bytes data = 1;
601588
}
602589

603-
// GetMetadataResponse is a message that is returned on GetMetadata rpc call
590+
// GetMetadataRequest is the message for the GetMetadata request.
591+
message GetMetadataRequest {
592+
// Empty
593+
}
594+
595+
// GetMetadataResponse is a message that is returned on GetMetadata rpc call.
604596
message GetMetadataResponse {
605597
string id = 1;
606-
repeated ActiveActorsCount active_actors_count = 2 [json_name = "actors"];
598+
// Deprecated alias for actor_runtime.active_actors.
599+
repeated ActiveActorsCount active_actors_count = 2 [json_name = "actors", deprecated = true];
607600
repeated RegisteredComponents registered_components = 3 [json_name = "components"];
608601
map<string, string> extended_metadata = 4 [json_name = "extended"];
609602
repeated PubsubSubscription subscriptions = 5 [json_name = "subscriptions"];
610603
repeated MetadataHTTPEndpoint http_endpoints = 6 [json_name = "httpEndpoints"];
611604
AppConnectionProperties app_connection_properties = 7 [json_name = "appConnectionProperties"];
612605
string runtime_version = 8 [json_name = "runtimeVersion"];
613606
repeated string enabled_features = 9 [json_name = "enabledFeatures"];
607+
ActorRuntime actor_runtime = 10 [json_name = "actorRuntime"];
608+
}
609+
610+
message ActorRuntime {
611+
enum ActorRuntimeStatus {
612+
// Indicates that the actor runtime is still being initialized.
613+
INITIALIZING = 0;
614+
// Indicates that the actor runtime is disabled.
615+
// This normally happens when Dapr is started without "placement-host-address"
616+
DISABLED = 1;
617+
// Indicates the actor runtime is running, either as an actor host or client.
618+
RUNNING = 2;
619+
}
620+
621+
// Contains an enum indicating whether the actor runtime has been initialized.
622+
ActorRuntimeStatus runtime_status = 1 [json_name = "runtimeStatus"];
623+
// Count of active actors per type.
624+
repeated ActiveActorsCount active_actors = 2 [json_name = "activeActors"];
625+
// Indicates whether the actor runtime is ready to host actors.
626+
bool host_ready = 3 [json_name = "hostReady"];
627+
// Custom message from the placement provider.
628+
string placement = 4 [json_name = "placement"];
614629
}
615630

616631
message ActiveActorsCount {
@@ -1088,3 +1103,8 @@ message PurgeWorkflowRequest {
10881103
// Name of the workflow component.
10891104
string workflow_component = 2 [json_name = "workflowComponent"];
10901105
}
1106+
1107+
// ShutdownRequest is the request for Shutdown.
1108+
message ShutdownRequest {
1109+
// Empty
1110+
}

src/client.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ impl DaprInterface for dapr_v1::dapr_client::DaprClient<TonicChannel> {
333333
}
334334

335335
async fn get_metadata(&mut self) -> Result<GetMetadataResponse, Error> {
336-
Ok(self.get_metadata(Request::new(())).await?.into_inner())
336+
Ok(self.get_metadata(GetMetadataRequest {}).await?.into_inner())
337337
}
338338
}
339339

@@ -376,6 +376,9 @@ pub type GetSecretResponse = dapr_v1::GetSecretResponse;
376376
/// A response from getting metadata
377377
pub type GetMetadataResponse = dapr_v1::GetMetadataResponse;
378378

379+
/// A request for getting metadata
380+
pub type GetMetadataRequest = dapr_v1::GetMetadataRequest;
381+
379382
/// A request for setting metadata
380383
pub type SetMetadataRequest = dapr_v1::SetMetadataRequest;
381384

0 commit comments

Comments
 (0)