Package io.dapr.client
Interface DaprClient
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DaprClientImpl
Generic Client Adapter to be used regardless of the GRPC or the HTTP Client implementation required.
-
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>deleteState(DeleteStateRequest request) Delete a state.reactor.core.publisher.Mono<Void>deleteState(String storeName, String key) Delete a state.reactor.core.publisher.Mono<Void>deleteState(String storeName, String key, String etag, StateOptions options) Delete a state.reactor.core.publisher.Mono<Void>Execute a transaction.reactor.core.publisher.Mono<Void>executeStateTransaction(String storeName, List<TransactionalStateOperation<?>> operations) Execute a transaction.getBulkSecret(GetBulkSecretRequest request) Fetches all secrets from the configured vault.getBulkSecret(String storeName) Fetches all secrets from the configured vault.getBulkSecret(String storeName, Map<String, String> metadata) Fetches all secrets from the configured vault.getBulkState(GetBulkStateRequest request, TypeRef<T> type) Retrieve bulk States based on their keys.getBulkState(String storeName, List<String> keys, TypeRef<T> type) Retrieve bulk States based on their keys.getBulkState(String storeName, List<String> keys, Class<T> clazz) Retrieve bulk States based on their keys.reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(GetConfigurationRequest request) Retrieve Map of configurations based on a provided configuration request object.reactor.core.publisher.Mono<ConfigurationItem>getConfiguration(String storeName, String key) Retrieve a configuration based on a provided key.reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(String storeName, String... keys) Retrieve Map of configurations based on a provided variable number of keys.reactor.core.publisher.Mono<ConfigurationItem>Retrieve a configuration based on a provided key.reactor.core.publisher.Mono<Map<String,ConfigurationItem>> Retrieve Map of configurations based on a provided variable number of keys.reactor.core.publisher.Mono<DaprMetadata>Fetches Dapr Metadata from the metadata endpoint.getSecret(GetSecretRequest request) Fetches a secret from the configured vault.Fetches a secret from the configured vault.Fetches a secret from the configured vault.<T> reactor.core.publisher.Mono<State<T>>getState(GetStateRequest request, TypeRef<T> type) Retrieve a State based on their key.<T> reactor.core.publisher.Mono<State<T>>Retrieve a State based on their key.<T> reactor.core.publisher.Mono<State<T>>Retrieve a State based on their key.<T> reactor.core.publisher.Mono<State<T>>getState(String storeName, String key, StateOptions options, TypeRef<T> type) Retrieve a State based on their key.<T> reactor.core.publisher.Mono<State<T>>getState(String storeName, String key, StateOptions options, Class<T> clazz) Retrieve a State based on their key.<T> reactor.core.publisher.Mono<State<T>>Retrieve a State based on their key.<T> reactor.core.publisher.Mono<State<T>>Retrieve a State based on their key.reactor.core.publisher.Mono<Void>invokeBinding(InvokeBindingRequest request) Invokes a Binding operation.<T> reactor.core.publisher.Mono<T>invokeBinding(InvokeBindingRequest request, TypeRef<T> type) Invokes a Binding operation.reactor.core.publisher.Mono<byte[]>Invokes a Binding operation, skipping serialization.reactor.core.publisher.Mono<Void>invokeBinding(String bindingName, String operation, Object data) Invokes a Binding operation.<T> reactor.core.publisher.Mono<T>invokeBinding(String bindingName, String operation, Object data, TypeRef<T> type) Invokes a Binding operation.<T> reactor.core.publisher.Mono<T>invokeBinding(String bindingName, String operation, Object data, Class<T> clazz) Invokes a Binding operation.<T> reactor.core.publisher.Mono<T>invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata, TypeRef<T> type) Invokes a Binding operation.<T> reactor.core.publisher.Mono<T>invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata, Class<T> clazz) Invokes a Binding operation.<T> reactor.core.publisher.Mono<T>invokeMethod(InvokeMethodRequest invokeMethodRequest, TypeRef<T> type) Invoke a service method.reactor.core.publisher.Mono<byte[]>invokeMethod(String appId, String methodName, byte[] request, HttpExtension httpExtension, Map<String, String> metadata) Invoke a service method, without using serialization.reactor.core.publisher.Mono<Void>invokeMethod(String appId, String methodName, HttpExtension httpExtension, Map<String, String> metadata) Invoke a service method, using serialization.<T> reactor.core.publisher.Mono<T>invokeMethod(String appId, String methodName, HttpExtension httpExtension, Map<String, String> metadata, TypeRef<T> type) Invoke a service method, using serialization.<T> reactor.core.publisher.Mono<T>invokeMethod(String appId, String methodName, HttpExtension httpExtension, Map<String, String> metadata, Class<T> clazz) Invoke a service method, using serialization.reactor.core.publisher.Mono<Void>invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension) Invoke a service method, using serialization.<T> reactor.core.publisher.Mono<T>invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, TypeRef<T> type) Invoke a service method, using serialization.<T> reactor.core.publisher.Mono<T>invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, Class<T> clazz) Invoke a service method, using serialization.reactor.core.publisher.Mono<Void>invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, Map<String, String> metadata) Invoke a service method, using serialization.<T> reactor.core.publisher.Mono<T>invokeMethod(String appId, String methodName, Object data, HttpExtension httpExtension, Map<String, String> metadata, TypeRef<T> type) Invoke a service method, using serialization.<T> reactor.core.publisher.Mono<T>invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, Map<String, String> metadata, Class<T> clazz) Invoke a service method, using serialization.<T extends io.grpc.stub.AbstractStub<T>>
TnewGrpcStub(String appId, Function<io.grpc.Channel, T> stubBuilder) Returns a newly created gRPC stub with proper interceptors and channel for gRPC proxy invocation.reactor.core.publisher.Mono<Void>publishEvent(PublishEventRequest request) Publish an event.reactor.core.publisher.Mono<Void>publishEvent(String pubsubName, String topicName, Object data) Publish an event.reactor.core.publisher.Mono<Void>Publish an event.reactor.core.publisher.Mono<Void>saveBulkState(SaveStateRequest request) Save/Update a list of states.reactor.core.publisher.Mono<Void>saveBulkState(String storeName, List<State<?>> states) Save/Update a list of states.reactor.core.publisher.Mono<Void>Save/Update a state.reactor.core.publisher.Mono<Void>Save/Update a state.reactor.core.publisher.Mono<Void>shutdown()Gracefully shutdown the dapr runtime.reactor.core.publisher.Flux<SubscribeConfigurationResponse>Subscribe to the keys for any change.reactor.core.publisher.Flux<SubscribeConfigurationResponse>subscribeConfiguration(String storeName, String... keys) Subscribe to the keys for any change.reactor.core.publisher.Flux<SubscribeConfigurationResponse>Subscribe to the keys for any change.reactor.core.publisher.Mono<UnsubscribeConfigurationResponse>Unsubscribe from previously subscribed keys.reactor.core.publisher.Mono<UnsubscribeConfigurationResponse>unsubscribeConfiguration(String id, String storeName) Unsubscribe from previously subscribed keys.reactor.core.publisher.Mono<Void>waitForSidecar(int timeoutInMilliseconds) Waits for the sidecar, giving up after timeout.Methods inherited from interface java.lang.AutoCloseable
close
-
Method Details
-
waitForSidecar
Waits for the sidecar, giving up after timeout.- Parameters:
timeoutInMilliseconds- Timeout in milliseconds to wait for sidecar.- Returns:
- a Mono plan of type Void.
-
publishEvent
Publish an event.- Parameters:
pubsubName- the pubsub name we will publish the event totopicName- the topicName where the event will be published.data- the event's data to be published, use byte[] for skipping serialization.- Returns:
- a Mono plan of type Void.
-
publishEvent
reactor.core.publisher.Mono<Void> publishEvent(String pubsubName, String topicName, Object data, Map<String, String> metadata) Publish an event.- Parameters:
pubsubName- the pubsub name we will publish the event totopicName- the topicName where the event will be published.data- the event's data to be published, use byte[] for skipping serialization.metadata- The metadata for the published event.- Returns:
- a Mono plan of type Void.
-
publishEvent
Publish an event.- Parameters:
request- the request for the publish event.- Returns:
- a Mono plan of a Dapr's void response.
-
invokeMethod
<T> reactor.core.publisher.Mono<T> invokeMethod(String appId, String methodName, Object data, HttpExtension httpExtension, Map<String, String> metadata, TypeRef<T> type) Invoke a service method, using serialization.- Type Parameters:
T- The Type of the return, use byte[] to skip serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.data- The data to be sent to invoke the service, use byte[] to skip serialization.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.metadata- Metadata (in GRPC) or headers (in HTTP) to be sent in data.type- The Type needed as return for the call.- Returns:
- A Mono Plan of type T.
-
invokeMethod
<T> reactor.core.publisher.Mono<T> invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, Map<String, String> metadata, Class<T> clazz) Invoke a service method, using serialization.- Type Parameters:
T- The Type of the return, use byte[] to skip serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.request- The request to be sent to invoke the service, use byte[] to skip serialization.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.metadata- Metadata (in GRPC) or headers (in HTTP) to be sent in request.clazz- The type needed as return for the call.- Returns:
- A Mono Plan of type T.
-
invokeMethod
<T> reactor.core.publisher.Mono<T> invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, TypeRef<T> type) Invoke a service method, using serialization.- Type Parameters:
T- The Type of the return, use byte[] to skip serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.request- The request to be sent to invoke the service, use byte[] to skip serialization.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.type- The Type needed as return for the call.- Returns:
- A Mono Plan of type T.
-
invokeMethod
<T> reactor.core.publisher.Mono<T> invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, Class<T> clazz) Invoke a service method, using serialization.- Type Parameters:
T- The Type of the return, use byte[] to skip serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.request- The request to be sent to invoke the service, use byte[] to skip serialization.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.clazz- The type needed as return for the call.- Returns:
- A Mono Plan of type T.
-
invokeMethod
<T> reactor.core.publisher.Mono<T> invokeMethod(String appId, String methodName, HttpExtension httpExtension, Map<String, String> metadata, TypeRef<T> type) Invoke a service method, using serialization.- Type Parameters:
T- The Type of the return, use byte[] to skip serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.metadata- Metadata (in GRPC) or headers (in HTTP) to be sent in request.type- The Type needed as return for the call.- Returns:
- A Mono Plan of type T.
-
invokeMethod
<T> reactor.core.publisher.Mono<T> invokeMethod(String appId, String methodName, HttpExtension httpExtension, Map<String, String> metadata, Class<T> clazz) Invoke a service method, using serialization.- Type Parameters:
T- The Type of the return, use byte[] to skip serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.metadata- Metadata (in GRPC) or headers (in HTTP) to be sent in request.clazz- The type needed as return for the call.- Returns:
- A Mono Plan of type T.
-
invokeMethod
reactor.core.publisher.Mono<Void> invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension, Map<String, String> metadata) Invoke a service method, using serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.request- The request to be sent to invoke the service, use byte[] to skip serialization.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.metadata- Metadata (in GRPC) or headers (in HTTP) to be sent in request.- Returns:
- A Mono Plan of type Void.
-
invokeMethod
reactor.core.publisher.Mono<Void> invokeMethod(String appId, String methodName, Object request, HttpExtension httpExtension) Invoke a service method, using serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.request- The request to be sent to invoke the service, use byte[] to skip serialization.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.- Returns:
- A Mono Plan of type Void.
-
invokeMethod
reactor.core.publisher.Mono<Void> invokeMethod(String appId, String methodName, HttpExtension httpExtension, Map<String, String> metadata) Invoke a service method, using serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.metadata- Metadata (in GRPC) or headers (in HTTP) to be sent in request.- Returns:
- A Mono Plan of type Void.
-
invokeMethod
reactor.core.publisher.Mono<byte[]> invokeMethod(String appId, String methodName, byte[] request, HttpExtension httpExtension, Map<String, String> metadata) Invoke a service method, without using serialization.- Parameters:
appId- The Application ID where the service is.methodName- The actual Method to be call in the application.request- The request to be sent to invoke the service, use byte[] to skip serialization.httpExtension- Additional fields that are needed if the receiving app is listening on HTTP,HttpExtension.NONEotherwise.metadata- Metadata (in GRPC) or headers (in HTTP) to be sent in request.- Returns:
- A Mono Plan of type byte[].
-
invokeMethod
<T> reactor.core.publisher.Mono<T> invokeMethod(InvokeMethodRequest invokeMethodRequest, TypeRef<T> type) Invoke a service method.- Type Parameters:
T- The Type of the return, use byte[] to skip serialization.- Parameters:
invokeMethodRequest- Request object.type- The Type needed as return for the call.- Returns:
- A Mono Plan of type T.
-
invokeBinding
Invokes a Binding operation.- Parameters:
bindingName- The bindingName of the binding to call.operation- The operation to be performed by the binding request processor.data- The data to be processed, use byte[] to skip serialization.- Returns:
- an empty Mono.
-
invokeBinding
reactor.core.publisher.Mono<byte[]> invokeBinding(String bindingName, String operation, byte[] data, Map<String, String> metadata) Invokes a Binding operation, skipping serialization.- Parameters:
bindingName- The name of the binding to call.operation- The operation to be performed by the binding request processor.data- The data to be processed, skipping serialization.metadata- The metadata map.- Returns:
- a Mono plan of type byte[].
-
invokeBinding
<T> reactor.core.publisher.Mono<T> invokeBinding(String bindingName, String operation, Object data, TypeRef<T> type) Invokes a Binding operation.- Type Parameters:
T- The type of the return- Parameters:
bindingName- The name of the binding to call.operation- The operation to be performed by the binding request processor.data- The data to be processed, use byte[] to skip serialization.type- The type being returned.- Returns:
- a Mono plan of type T.
-
invokeBinding
<T> reactor.core.publisher.Mono<T> invokeBinding(String bindingName, String operation, Object data, Class<T> clazz) Invokes a Binding operation.- Type Parameters:
T- The type of the return- Parameters:
bindingName- The name of the binding to call.operation- The operation to be performed by the binding request processor.data- The data to be processed, use byte[] to skip serialization.clazz- The type being returned.- Returns:
- a Mono plan of type T.
-
invokeBinding
<T> reactor.core.publisher.Mono<T> invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata, TypeRef<T> type) Invokes a Binding operation.- Type Parameters:
T- The type of the return- Parameters:
bindingName- The name of the binding to call.operation- The operation to be performed by the binding request processor.data- The data to be processed, use byte[] to skip serialization.metadata- The metadata map.type- The type being returned.- Returns:
- a Mono plan of type T.
-
invokeBinding
<T> reactor.core.publisher.Mono<T> invokeBinding(String bindingName, String operation, Object data, Map<String, String> metadata, Class<T> clazz) Invokes a Binding operation.- Type Parameters:
T- The type of the return- Parameters:
bindingName- The name of the binding to call.operation- The operation to be performed by the binding request processor.data- The data to be processed, use byte[] to skip serialization.metadata- The metadata map.clazz- The type being returned.- Returns:
- a Mono plan of type T.
-
invokeBinding
Invokes a Binding operation.- Parameters:
request- The binding invocation request.- Returns:
- a Mono with void.
-
invokeBinding
Invokes a Binding operation.- Type Parameters:
T- The type of the return- Parameters:
request- The binding invocation request.type- The type being returned.- Returns:
- a Mono plan of type T.
-
getState
<T> reactor.core.publisher.Mono<State<T>> getState(String storeName, State<T> state, TypeRef<T> type) Retrieve a State based on their key.- Type Parameters:
T- The type of the return.- Parameters:
storeName- The name of the state store.state- State to be re-retrieved.type- The type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getState
<T> reactor.core.publisher.Mono<State<T>> getState(String storeName, State<T> state, Class<T> clazz) Retrieve a State based on their key.- Type Parameters:
T- The type of the return.- Parameters:
storeName- The name of the state store.state- State to be re-retrieved.clazz- The type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getState
Retrieve a State based on their key.- Type Parameters:
T- The type of the return.- Parameters:
storeName- The name of the state store.key- The key of the State to be retrieved.type- The type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getState
Retrieve a State based on their key.- Type Parameters:
T- The type of the return.- Parameters:
storeName- The name of the state store.key- The key of the State to be retrieved.clazz- The type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getState
<T> reactor.core.publisher.Mono<State<T>> getState(String storeName, String key, StateOptions options, TypeRef<T> type) Retrieve a State based on their key.- Type Parameters:
T- The Type of the return.- Parameters:
storeName- The name of the state store.key- The key of the State to be retrieved.options- Optional settings for retrieve operation.type- The Type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getState
<T> reactor.core.publisher.Mono<State<T>> getState(String storeName, String key, StateOptions options, Class<T> clazz) Retrieve a State based on their key.- Type Parameters:
T- The Type of the return.- Parameters:
storeName- The name of the state store.key- The key of the State to be retrieved.options- Optional settings for retrieve operation.clazz- The Type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getState
Retrieve a State based on their key.- Type Parameters:
T- The Type of the return.- Parameters:
request- The request to get state.type- The Type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getBulkState
<T> reactor.core.publisher.Mono<List<State<T>>> getBulkState(String storeName, List<String> keys, TypeRef<T> type) Retrieve bulk States based on their keys.- Type Parameters:
T- The type of the return.- Parameters:
storeName- The name of the state store.keys- The keys of the State to be retrieved.type- The type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getBulkState
<T> reactor.core.publisher.Mono<List<State<T>>> getBulkState(String storeName, List<String> keys, Class<T> clazz) Retrieve bulk States based on their keys.- Type Parameters:
T- The type of the return.- Parameters:
storeName- The name of the state store.keys- The keys of the State to be retrieved.clazz- The type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
getBulkState
<T> reactor.core.publisher.Mono<List<State<T>>> getBulkState(GetBulkStateRequest request, TypeRef<T> type) Retrieve bulk States based on their keys.- Type Parameters:
T- The Type of the return.- Parameters:
request- The request to get state.type- The Type of State needed as return.- Returns:
- A Mono Plan for the requested State.
-
executeStateTransaction
reactor.core.publisher.Mono<Void> executeStateTransaction(String storeName, List<TransactionalStateOperation<?>> operations) Execute a transaction.- Parameters:
storeName- The name of the state store.operations- The operations to be performed.- Returns:
- a Mono plan of type Void
-
executeStateTransaction
Execute a transaction.- Parameters:
request- Request to execute transaction.- Returns:
- a Mono plan of type Response Void
-
saveBulkState
Save/Update a list of states.- Parameters:
storeName- The name of the state store.states- The States to be saved.- Returns:
- a Mono plan of type Void.
-
saveBulkState
Save/Update a list of states.- Parameters:
request- Request to save states.- Returns:
- a Mono plan of type Void.
-
saveState
Save/Update a state.- Parameters:
storeName- The name of the state store.key- The key of the state.value- The value of the state.- Returns:
- a Mono plan of type Void.
-
saveState
reactor.core.publisher.Mono<Void> saveState(String storeName, String key, String etag, Object value, StateOptions options) Save/Update a state.- Parameters:
storeName- The name of the state store.key- The key of the state.etag- The etag to be used.value- The value of the state.options- The Options to use for each state.- Returns:
- a Mono plan of type Void.
-
deleteState
Delete a state.- Parameters:
storeName- The name of the state store.key- The key of the State to be removed.- Returns:
- a Mono plan of type Void.
-
deleteState
reactor.core.publisher.Mono<Void> deleteState(String storeName, String key, String etag, StateOptions options) Delete a state.- Parameters:
storeName- The name of the state store.key- The key of the State to be removed.etag- Optional etag for conditional delete.options- Optional settings for state operation.- Returns:
- a Mono plan of type Void.
-
deleteState
Delete a state.- Parameters:
request- Request to delete a state.- Returns:
- a Mono plan of type Void.
-
getSecret
reactor.core.publisher.Mono<Map<String,String>> getSecret(String storeName, String secretName, Map<String, String> metadata) Fetches a secret from the configured vault.- Parameters:
storeName- Name of vault component in Dapr.secretName- Secret to be fetched.metadata- Optional metadata.- Returns:
- Key-value pairs for the secret.
-
getSecret
Fetches a secret from the configured vault.- Parameters:
storeName- Name of vault component in Dapr.secretName- Secret to be fetched.- Returns:
- Key-value pairs for the secret.
-
getSecret
Fetches a secret from the configured vault.- Parameters:
request- Request to fetch secret.- Returns:
- Key-value pairs for the secret.
-
getBulkSecret
Fetches all secrets from the configured vault.- Parameters:
storeName- Name of vault component in Dapr.- Returns:
- Key-value pairs for all the secrets in the state store.
-
getBulkSecret
reactor.core.publisher.Mono<Map<String,Map<String, getBulkSecretString>>> (String storeName, Map<String, String> metadata) Fetches all secrets from the configured vault.- Parameters:
storeName- Name of vault component in Dapr.metadata- Optional metadata.- Returns:
- Key-value pairs for all the secrets in the state store.
-
getBulkSecret
reactor.core.publisher.Mono<Map<String,Map<String, getBulkSecretString>>> (GetBulkSecretRequest request) Fetches all secrets from the configured vault.- Parameters:
request- Request to fetch secret.- Returns:
- Key-value pairs for the secret.
-
getConfiguration
Retrieve a configuration based on a provided key.- Parameters:
storeName- Name of the configuration storekey- key of the configuration item which is to be retrieved- Returns:
- Mono of the Configuration Item
-
getConfiguration
reactor.core.publisher.Mono<ConfigurationItem> getConfiguration(String storeName, String key, Map<String, String> metadata) Retrieve a configuration based on a provided key.- Parameters:
storeName- Name of the configuration storekey- key of the configuration item which is to be retrievedmetadata- optional metadata- Returns:
- Mono of the Configuration Item
-
getConfiguration
reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(String storeName, String... keys) Retrieve Map of configurations based on a provided variable number of keys.- Parameters:
storeName- Name of the configuration storekeys- keys of the configurations which are to be retrieved- Returns:
- Mono of Map of ConfigurationItems
-
getConfiguration
reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(String storeName, List<String> keys, Map<String, String> metadata) Retrieve Map of configurations based on a provided variable number of keys.- Parameters:
storeName- Name of the configuration storekeys- keys of the configurations which are to be retrievedmetadata- optional metadata- Returns:
- Mono of Map of ConfigurationItems
-
getConfiguration
reactor.core.publisher.Mono<Map<String,ConfigurationItem>> getConfiguration(GetConfigurationRequest request) Retrieve Map of configurations based on a provided configuration request object.- Parameters:
request- request for retrieving Configurations for a list keys- Returns:
- Mono of Map of ConfigurationItems
-
subscribeConfiguration
reactor.core.publisher.Flux<SubscribeConfigurationResponse> subscribeConfiguration(String storeName, String... keys) Subscribe to the keys for any change.- Parameters:
storeName- Name of the configuration storekeys- keys of the configurations which are to be subscribed- Returns:
- Flux of
SubscribeConfigurationResponseinstance
-
subscribeConfiguration
reactor.core.publisher.Flux<SubscribeConfigurationResponse> subscribeConfiguration(String storeName, List<String> keys, Map<String, String> metadata) Subscribe to the keys for any change.- Parameters:
storeName- Name of the configuration storekeys- keys of the configurations which are to be subscribedmetadata- optional metadata- Returns:
- Flux of
SubscribeConfigurationResponseinstance
-
subscribeConfiguration
reactor.core.publisher.Flux<SubscribeConfigurationResponse> subscribeConfiguration(SubscribeConfigurationRequest request) Subscribe to the keys for any change.- Parameters:
request- request for subscribing to any change for the given keys in request- Returns:
- Flux of
SubscribeConfigurationResponseinstance
-
unsubscribeConfiguration
reactor.core.publisher.Mono<UnsubscribeConfigurationResponse> unsubscribeConfiguration(String id, String storeName) Unsubscribe from previously subscribed keys.- Parameters:
id- subscription id returned by subscribeConfiguration API.storeName- Name of the configuration store.- Returns:
- Mono of
UnsubscribeConfigurationResponseinstance.
-
unsubscribeConfiguration
reactor.core.publisher.Mono<UnsubscribeConfigurationResponse> unsubscribeConfiguration(UnsubscribeConfigurationRequest request) Unsubscribe from previously subscribed keys.- Parameters:
request- request for unsubscribing to any change for the given subscription id in request- Returns:
- Mono of
UnsubscribeConfigurationResponseinstance.
-
newGrpcStub
<T extends io.grpc.stub.AbstractStub<T>> T newGrpcStub(String appId, Function<io.grpc.Channel, T> stubBuilder) Returns a newly created gRPC stub with proper interceptors and channel for gRPC proxy invocation.- Type Parameters:
T- the generic type of the service to be invoked.- Parameters:
appId- appId to be included in all gRPC calls for service invocation.stubBuilder- user-provided callback method to construct a new stub given the channel.- Returns:
- the gRPC stub with proper interceptors and channel.
-
getMetadata
reactor.core.publisher.Mono<DaprMetadata> getMetadata()Fetches Dapr Metadata from the metadata endpoint.- Returns:
- DaprMetadata containing Dapr Metadata from the metadata endpoint.
-
shutdown
reactor.core.publisher.Mono<Void> shutdown()Gracefully shutdown the dapr runtime.- Returns:
- a Mono plan of type Void.
-