* add some examples - need review
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
* attempt to add go examples for query state and actors
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
* move to a different branch
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
* add back crypto
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
---------
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
* Add `NewServiceWithGrpcServer` to gRPC service
Signed-off-by: pimmerks <pimmerks@users.noreply.github.com>
* Apply suggestion of not creating new variable
Signed-off-by: pimmerks <pimmerks@users.noreply.github.com>
---------
Signed-off-by: pimmerks <pimmerks@users.noreply.github.com>
* Adds context to rest of funcs, so context can always be propagated.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Use separate interface for structs with context funcs
Signed-off-by: joshvanl <me@joshvanl.dev>
* Update proto to include actor state transaction metadata
Signed-off-by: joshvanl <me@joshvanl.dev>
* Adds `SetWithTTL` to actor state store manager
Signed-off-by: joshvanl <me@joshvanl.dev>
* Update actor client to support sending metadata. Supports `ttlInSeconds`
Signed-off-by: joshvanl <me@joshvanl.dev>
* Update actor example to use SetWithTTL with note that it should always
be used
Signed-off-by: joshvanl <me@joshvanl.dev>
* Update go modules
Signed-off-by: joshvanl <me@joshvanl.dev>
* Ignore deprecated use of `actor.Server` in `ActorContainer` interface
Signed-off-by: joshvanl <me@joshvanl.dev>
---------
Signed-off-by: joshvanl <me@joshvanl.dev>
* Adds context to rest of funcs, so context can always be propagated.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Adds `//nolint:interfacebloat` to StateManager interface due to new
`xxxContext` methods.
Signed-off-by: joshvanl <me@joshvanl.dev>
* Use separate interface for structs with context funcs
Signed-off-by: joshvanl <me@joshvanl.dev>
* Adds more locks to actor functions
Signed-off-by: joshvanl <me@joshvanl.dev>
---------
Signed-off-by: joshvanl <me@joshvanl.dev>
* Various fixed and cleanups
1. Fixed SDK not compiling and tests failing
2. Increased minimum Go version to 1.18
3. Removed `github.com/pkg/errors` and `go.uber.org/atomic` - replaced with the standard library instead (the old packages have been added to the "depguard" linter)
4. Upgraded all dependencies
5. Upgraded golangci-lint to support Go 1.18+
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Do not wrap error if nil
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Run CI on Go 1.18 and 1.19
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Restore compatibility with Go 1.18
Looks like the newer methods were added in Go 1.19 only
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Should fix validate_examples CI
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Updated (most) deprecated Actions
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Fix helm repo
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Determine latest Dapr version in a better way
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* Fix validate.sh
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
* return the specific error type of the actor state, caused by empty key or unmarshal fail
Signed-off-by: wangxw <996268132@qq.com>
* Update state_async_provider.go
change log level of state load
Signed-off-by: wXwcoder <996268132@qq.com>
Signed-off-by: wangxw <996268132@qq.com>
Signed-off-by: wXwcoder <996268132@qq.com>
* Add wait() method to block until Sidecar is up.
App might depend on sidecar right away. This PR adds a Wait() method to
enable app to wait for sidecar to be up before invoking the first call.
GRPC client creation on Dapr Go SDK is blocking, so waiting for client
readiness is less of a problem here than on SDKs where client
connection establishment is async.
Closes#287
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Move Wait its own file.
If anything, this will make testing and the change more localized.
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Adding unresponsive TCP and Unix servers and tests
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Remove comments, clean code up
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Remove a bit of code duplication on tests
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Fix Wait and test server setup.
* Multiple state changes can happen for a single GRPC Connection.
previous code assume a single one and was failing miserably. Fixed.
* The logic for the test server's tear down was lacking. Fixed
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Rename on aux. method
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Add link to gRPC documentation about connectivity semantics
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Fixing lint errors
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
* Fixing more lint errors
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>
Signed-off-by: Tiago Alves Macambira <tmacam@burocrata.org>