public interface DaprClient
Modifier and Type | Method and Description |
---|---|
reactor.core.publisher.Mono<Void> |
deleteState(String key)
Delete a state.
|
reactor.core.publisher.Mono<Void> |
deleteState(String key,
String etag,
StateOptions options)
Delete a state.
|
<T> reactor.core.publisher.Mono<State<T>> |
getState(State<T> state,
Class<T> clazz)
Retrieve a State based on their key.
|
<T> reactor.core.publisher.Mono<State<T>> |
getState(String key,
Class<T> clazz)
Retrieve a State based on their key.
|
<T> reactor.core.publisher.Mono<State<T>> |
getState(String key,
String etag,
StateOptions options,
Class<T> clazz)
Retrieve a State based on their key.
|
reactor.core.publisher.Mono<Void> |
invokeBinding(String name,
Object request)
Invokes a Binding.
|
reactor.core.publisher.Mono<Void> |
invokeBinding(String name,
Object request,
Map<String,String> metadata)
Invokes a Binding with metadata.
|
reactor.core.publisher.Mono<byte[]> |
invokeService(Verb verb,
String appId,
String method,
byte[] request,
Map<String,String> metadata)
Invoke a service without serialization.
|
reactor.core.publisher.Mono<Void> |
invokeService(Verb verb,
String appId,
String method,
Map<String,String> metadata)
Invoke a service without input and void response.
|
<T> reactor.core.publisher.Mono<T> |
invokeService(Verb verb,
String appId,
String method,
Map<String,String> metadata,
Class<T> clazz)
Invoke a service without input, using serialization for response.
|
reactor.core.publisher.Mono<Void> |
invokeService(Verb verb,
String appId,
String method,
Object request)
Invoke a service with void response, no metadata and using serialization.
|
<T> reactor.core.publisher.Mono<T> |
invokeService(Verb verb,
String appId,
String method,
Object request,
Class<T> clazz)
Invoke a service without metadata, using serialization.
|
reactor.core.publisher.Mono<Void> |
invokeService(Verb verb,
String appId,
String method,
Object request,
Map<String,String> metadata)
Invoke a service with void response, using serialization.
|
<T> reactor.core.publisher.Mono<T> |
invokeService(Verb verb,
String appId,
String method,
Object request,
Map<String,String> metadata,
Class<T> clazz)
Invoke a service with all possible parameters, using serialization.
|
reactor.core.publisher.Mono<Void> |
publishEvent(String topic,
Object event)
Publish an event.
|
reactor.core.publisher.Mono<Void> |
publishEvent(String topic,
Object event,
Map<String,String> metadata)
Publish an event.
|
reactor.core.publisher.Mono<Void> |
saveState(String key,
Object value)
Save/Update a state.
|
reactor.core.publisher.Mono<Void> |
saveState(String key,
String etag,
Object value,
StateOptions options)
Save/Update a state.
|
reactor.core.publisher.Mono<Void> |
saveStates(List<State<?>> states)
Save/Update a list of states.
|
reactor.core.publisher.Mono<Void> publishEvent(String topic, Object event)
topic
- the topic where the event will be published.event
- the event to be published, use byte[] for skipping serialization.reactor.core.publisher.Mono<Void> publishEvent(String topic, Object event, Map<String,String> metadata)
topic
- the topic where the event will be published.event
- the event to be published, use byte[] for skipping serialization.metadata
- The metadata for the published event.<T> reactor.core.publisher.Mono<T> invokeService(Verb verb, String appId, String method, Object request, Map<String,String> metadata, Class<T> clazz)
T
- the Type of the return, use byte[] to skip serialization.verb
- The Verb to be used for HTTP will be the HTTP Verb, for GRPC is just a metadata value.appId
- The Application ID where the service is.method
- The actual Method to be call in the application.request
- The request to be sent to invoke the service, use byte[] to skip serialization.metadata
- Metadata (in GRPC) or headers (in HTTP) to be send in request.clazz
- the Type needed as return for the call.<T> reactor.core.publisher.Mono<T> invokeService(Verb verb, String appId, String method, Object request, Class<T> clazz)
T
- the Type of the return, use byte[] to skip serialization.verb
- The Verb to be used for HTTP will be the HTTP Verb, for GRPC is just a metadata value.appId
- The Application ID where the service is.method
- The actual Method to be call in the application.request
- The request to be sent to invoke the service, use byte[] to skip serialization.clazz
- the Type needed as return for the call.<T> reactor.core.publisher.Mono<T> invokeService(Verb verb, String appId, String method, Map<String,String> metadata, Class<T> clazz)
T
- the Type of the return, use byte[] to skip serialization.verb
- The Verb to be used for HTTP will be the HTTP Verb, for GRPC is just a metadata value.appId
- The Application ID where the service is.method
- The actual Method to be call in the application.metadata
- Metadata (in GRPC) or headers (in HTTP) to be send in request.clazz
- the Type needed as return for the call.reactor.core.publisher.Mono<Void> invokeService(Verb verb, String appId, String method, Object request, Map<String,String> metadata)
verb
- The Verb to be used for HTTP will be the HTTP Verb, for GRPC is just a metadata value.appId
- The Application ID where the service is.method
- The actual Method to be call in the application.request
- The request to be sent to invoke the service, use byte[] to skip serialization.metadata
- Metadata (in GRPC) or headers (in HTTP) to be send in request.reactor.core.publisher.Mono<Void> invokeService(Verb verb, String appId, String method, Object request)
verb
- The Verb to be used for HTTP will be the HTTP Verb, for GRPC is just a metadata value.appId
- The Application ID where the service is.method
- The actual Method to be call in the application.request
- The request to be sent to invoke the service, use byte[] to skip serialization.reactor.core.publisher.Mono<Void> invokeService(Verb verb, String appId, String method, Map<String,String> metadata)
verb
- The Verb to be used for HTTP will be the HTTP Verb, for GRPC is just a metadata value.appId
- The Application ID where the service is.method
- The actual Method to be call in the application.metadata
- Metadata (in GRPC) or headers (in HTTP) to be send in request.reactor.core.publisher.Mono<byte[]> invokeService(Verb verb, String appId, String method, byte[] request, Map<String,String> metadata)
verb
- The Verb to be used for HTTP will be the HTTP Verb, for GRPC is just a metadata value.appId
- The Application ID where the service is.method
- The actual Method to be call in the application.request
- The request to be sent to invoke the servicemetadata
- Metadata (in GRPC) or headers (in HTTP) to be send in request.reactor.core.publisher.Mono<Void> invokeBinding(String name, Object request)
name
- The name of the biding to call.request
- The request needed for the binding, use byte[] to skip serialization.reactor.core.publisher.Mono<Void> invokeBinding(String name, Object request, Map<String,String> metadata)
name
- The name of the biding to call.request
- The request needed for the binding, use byte[] to skip serialization.metadata
- The metadata map.<T> reactor.core.publisher.Mono<State<T>> getState(State<T> state, Class<T> clazz)
T
- The Type of the return.state
- State to be re-retrieved.clazz
- The Type of State needed as return.<T> reactor.core.publisher.Mono<State<T>> getState(String key, Class<T> clazz)
T
- The Type of the return.key
- The key of the State to be retrieved.clazz
- The Type of State needed as return.<T> reactor.core.publisher.Mono<State<T>> getState(String key, String etag, StateOptions options, Class<T> clazz)
T
- The Type of the return.key
- The key of the State to be retrieved.etag
- Optional etag for conditional getoptions
- Optional settings for retrieve operation.clazz
- The Type of State needed as return.reactor.core.publisher.Mono<Void> saveStates(List<State<?>> states)
states
- the States to be saved.reactor.core.publisher.Mono<Void> saveState(String key, Object value)
key
- the key of the state.value
- the value of the state.reactor.core.publisher.Mono<Void> saveState(String key, String etag, Object value, StateOptions options)
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.reactor.core.publisher.Mono<Void> deleteState(String key)
key
- The key of the State to be removed.reactor.core.publisher.Mono<Void> deleteState(String key, String etag, StateOptions options)
key
- The key of the State to be removed.etag
- Optional etag for conditional delete.options
- Optional settings for state operation.Copyright © 2020. All rights reserved.