Add Actor Reminder/Timer TTL support
This commit adds the TTL field to Actor reminders/timers. This allows
reminders and timers to expire after a given TimeSpan instead of
having to be manually deleted.
https://github.com/dapr/dotnet-sdk/issues/788
Signed-off-by: Hal Spang <halspang@microsoft.com>
* Added dotnet methods for Distributed Lock API
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes based on the review comments
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes in examples to make them real world - based on the PR review
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Fixed application log statements
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes to implement IDisposable
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes based on the review comments
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Added a sample test case for TryLockResponse
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Changes based on the review comments - 2
Signed-off-by: Amulya Varote <amulyavarote@microsoft.com>
* Reworking the DistributedLock example
Signed-off-by: Hal Spang <halspang@microsoft.com>
Co-authored-by: Hal Spang <halspang@microsoft.com>
This commit allows different actor types to provide their own
configurations instead of relying on the top-level values. Any
value defined in them will be used instead of the top-level.
Anything that is left out will use the top-level or default if
it is undefined.
https://github.com/dapr/dotnet-sdk/issues/857
Signed-off-by: Hal Spang <halspang@microsoft.com>
Add Subscribe/Unsubscribe API support
This commit adds support for both the subscribe and unsubscribe
APIs for Darp's Configuration building block. The configuration can
now be exposed through the AspNet builder pattern or by making the
request directly with the DaprClient.
https://github.com/dapr/dotnet-sdk/issues/822
Signed-off-by: Hal Spang <halspang@microsoft.com>
The secret store configuration provider was trying to access Dapr
during the app startup. If the app started faster than Dapr, it would
get an error trying to access the secrets. This commit lets the
provider wait for the sidecar to come up before making any requests.
If the sidecar does not come up at all, we will still fail.
https://github.com/dapr/dotnet-sdk/issues/779
Signed-off-by: Hal Spang <halspang@microsoft.com>
* Adds support for providing Actor type name during runtime.
- Fixes#677
Signed-off-by: Martin Björkström <martin.bjorkstrom@gmail.com>
* Make ActorTypeInformation.TryGet(Type) and ActorTypeInformation.Get(Type) obsolete.
- Fix relevant code after obsoleting.
Signed-off-by: Martin Björkström <martin.bjorkstrom@gmail.com>
* Changed application port number for actors example
* Modified readme for actors example
* Update README.md
Signed-off-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
Co-authored-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
When an actor call fails, it is imperative that the state is reset.
In the remoting path, we were catching the exception and returning
an error response instead of propagating the exception. Without this,
the error path was never triggered. This allowed for state from
failed requests to persist on subsequent requests.
https://github.com/dapr/dotnet-sdk/issues/762
Signed-off-by: Hal Spang <halspang@microsoft.com>
This commit adds methods to the DaprClient to call the new Query API.
Currently, a raw query string is provided to the API. The API is
still in the alpha stage which may cause shifts in how the API works.
This should not effect how the SDK exposes the call, but may change
the underlying semantics.
https://github.com/dapr/dotnet-sdk/issues/777
Signed-off-by: Hal Spang <halspang@microsoft.com>
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
This commit adds support for the GetConfiguration API. This is an
alpha API and may be subject to change. This commit also does not
cover the Subscribe API for Configurations.
Included is a simple example showing the usage of the Configuration
API.
https://github.com/dapr/dotnet-sdk/issues/787
Signed-off-by: Hal Spang <halspang@microsoft.com>
This commit includes the copied files from dapr/dapr. These are used
to generate the gRPC client. Included in the update are:
- Configuration API
- Query API
Signed-off-by: Hal Spang <halspang@microsoft.com>
* Allow multiple topics to call the same endpoint
Using the WithTopic builder pattern allows you to specify multiple
topics that route to a single endpoint. Given the topics are unique,
this should be a valid case.
This change allows for a single endpoint to bind to multiple topics.
Note that this can only be done via the EndpointBuilder and not the
TopicAttribute.
https://github.com/dapr/dotnet-sdk/issues/715
* Let TopicAttribute to be specified multiple times
The endpoint builder allowed for multiple WithTopic calls so the
attribute should match that behavior.
This commit adds a gRPC interceptor which adds the necessary
headers for gRPC proxying to outgoing requests. This will allow
custom gRPC services to be invoked through the Dapr sidecar.
https://github.com/dapr/dotnet-sdk/issues/741
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
When "dapr_api_token" is specified in the environment variable, actor.statemanager cannot correctly set "dapr-api-token" in the request header。
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* Add an option to set Timeout for ActorProxy
Actors, by there nature, may have to wait for a long period before
being allowed to execute. This could lead to long request times. The
default timeout for the HttpClient being used is fairly low. This
commit allows for the timeout to be set when constructing the
proxy.
https://github.com/dapr/dotnet-sdk/issues/728
* Removed extra constructor and e2e tests.