Commit Graph

85 Commits

Author SHA1 Message Date
yellow chicks f182441168
feature(apphealth&configuration): add app health check & adapt new configuration API (#323)
* fix/typo: modify state  annotation

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

* feature(apphealth): add app health check

Signed-off-by: 1046102779 <seachen@tencent.com>

Signed-off-by: 1046102779 <seachen@tencent.com>
2022-09-30 15:19:16 -07:00
mikeb26 c89770a473
Add SaveStateWithETag() convenience function (#321)
In the state API there's an existing DeleteStateWithETag() convenience
function but there does not appear to be an equivalent
SaveStateWithETag(). This commit adds SetStateWithETag() so that
consumers of the SDK don't have to employ the more verbose
SaveBulkState() when they only need to update a singular item.

Client code updating a single item with an etag prior to this commit
looks like:

--
item := &dapr.SetStateItem{
	Etag: &dapr.ETag{
		Value: "deadbeef",
	},
	Key:   "order_1",
	Value: []byte(data),
}

err := client.SaveBulkState(ctx, store, item)
--

Client code after this commit can reduce to:

--
err := client.SaveStateWithEtag(ctx, store, "order_1", []byte(data), "deadbeef")
--

Signed-off-by: Mike Brown <github@torvosoft.com>

Signed-off-by: Mike Brown <github@torvosoft.com>
2022-09-28 09:47:33 -07:00
Ceres Cartman 7c38f5a607
fix: client default timeout (#310)
* fix: client default timeout #259

Signed-off-by: Ceres Cheng <chengzhoukun@gmail.com>

* Add documentation for client timeout environment variable

Signed-off-by: Ceres Cheng <chengzhoukun@gmail.com>
2022-08-05 16:58:03 -07:00
Yaron Schneider e086ac59a0
change ownerID to lockOwner (#301)
Signed-off-by: yaron2 <schneider.yaron@live.com>
2022-07-06 12:34:38 -07:00
Yaron Schneider 0b65cca826
Add distributed lock api support (#297)
* add distributed lock api support

Signed-off-by: yaron2 <schneider.yaron@live.com>

* go mod tidy for pub/sub

Signed-off-by: yaron2 <schneider.yaron@live.com>

* go mod tidy for state

Signed-off-by: yaron2 <schneider.yaron@live.com>

* go mod tidy for service invocation

Signed-off-by: yaron2 <schneider.yaron@live.com>

* linter

Signed-off-by: yaron2 <schneider.yaron@live.com>

* added unlock tests

Signed-off-by: yaron2 <schneider.yaron@live.com>
2022-06-22 10:37:17 +08:00
yellow chicks d204f691ed
fix/typo: modify state annotation (#283)
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-05-06 08:40:47 -07:00
Josh 24ccf7eb52
chore(client): update func definition to be clearer (#281)
Signed-off-by: Josh Dando <joshdando@Joshs-MacBook-Pro.local>

Co-authored-by: Josh Dando <joshdando@Joshs-MacBook-Pro.local>
2022-04-23 08:52:31 -07:00
yellow chicks 37c6c59fb4
fix(typo): client configuration subscribe (#279)
Signed-off-by: 1046102779 <seachen@tencent.com>
2022-04-19 11:10:16 +08:00
thielepaul 885ee8d326
Expose base grpcclient over client interface (#272)
Signed-off-by: Paul Thiele <thielepaul@gmail.com>
2022-04-14 07:04:24 -07:00
Laurence 6f2ae7df71
fix: config api (#200)
* Fix: Finished Configuration API

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* Fix: add configuration validation

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* Fix: fix validation test

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* Fix: remove validation

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* add ut

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>

* Fix: comment

Signed-off-by: LaurenceLiZhixin <382673304@qq.com>
2022-04-05 17:43:32 -07:00
Taction 365078470b
Simplify the use of pubsub rawPayload (#264)
* fix: simplify the use of pubsub rawPayload

Signed-off-by: zhangchao <zchao9100@gmail.com>

* add test

Signed-off-by: zhangchao <zchao9100@gmail.com>
2022-03-25 09:18:39 -07:00
Dmitry Shmulevich 9944bfebcc
update query test (#263)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-03-25 09:17:09 -07:00
Dmitry Shmulevich a0a4a9e70a
allow passage of metadata to state store API (#262)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2022-02-24 09:39:05 +08:00
Joni Collinge 8cc42bd7e3
Fix misspelt activateActor name (#253)
* fix misspelt deactiveActor method

Signed-off-by: Joni Collinge <jonathancollinge@live.com>

* fix mocks and tests

Signed-off-by: Joni Collinge <jonathancollinge@live.com>
2022-01-31 09:06:28 -08:00
huazhongming e53d1d8197
Support rename reminder (#251)
Signed-off-by: crazyhzm <crazyhzm@gmail.com>
2022-01-29 10:06:10 +08:00
Looong Dai f912500536
add Unix domain socket support (#206)
* add Unix domain socket support

Signed-off-by: Long <long0dai@foxmail.com>

* update examples

Signed-off-by: Long <long.dai@intel.com>
2022-01-13 09:40:24 -08:00
yellow chicks 078d0cdc40
bugfix/apptoken: missing app token verification codes (#236)
Signed-off-by: 1046102779 <seachen@tencent.com>
2021-12-29 15:42:08 +08:00
Dmitry Shmulevich a38be4e38b
replace license headers (#232)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-14 12:06:12 -08:00
Dmitry Shmulevich 15fc672e08
add support for state query API (#216)
Signed-off-by: Dmitry Shmulevich <dmitry.shmulevich@gmail.com>
2021-12-08 10:27:52 +08:00
Dmitry Shmulevich b93a185fa4
add TTL to actor timer/reminder requests (#225) 2021-12-08 09:36:48 +08:00
Laurence d9ad49d2a6
Feat: Add Go-sdk Actor Support (#196)
* ftr: init go-sdk action

* fix: finished design of actor-api's invoke feature

* fix: add readme

* fix: lint

* fix: add manager unit test

* fix: add actor state suport

* fix: add comments

* fix: add comment

* fix the change reqeust of pr

* fix: validate example test

* fix: linter

* add actor validation

* add actor validation

* fix: update actor validation init sleep time

* fix: add init time for validate example server

* fix: change actor to the end of test in order not to let reminder bother other test

* fix: validate test

* fix: typo of factory

* fix: add init time

* fix: ut

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Long Dai <long.dai@intel.com>
2021-11-02 14:45:27 -07:00
Michael Nussbaum 5d3a4ad3f2
Make client init fail if server connection fails (#213)
* Make client init fail if server connection fails

This prevents client/server connectivity issues from resulting in silent
failure modes and ensures they're caught as early as possible

* Fix linter errors

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-10-31 14:59:07 -07:00
Phil Kedy de68193d5c
Use proto packages that exist in dapr/dapr instead of generating them locally in the SDK. This enables the ability to embed Dapr and also use the SDK to interact with the Dapr APIs. Also moved go mod to 1.17. (#211) 2021-10-17 11:23:06 +08:00
Alessandro (Ale) Segala 9fceff83a1
Rationalize PublishEvent* APIs (#179)
* Rationalize PublishEvent* APIs
Allow passing options such as Content-Type and Metadata in a flexible and future-proof way.
The method `PublishEventfromCustomContent` is now deprecated and shows a warning in the console when used.
Fixes #174, #164

* Do not wrap errors for invocations
Fix #186

* Updated variable name

* Added error check

* Oops

* Linting

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
2021-10-07 10:18:57 -07:00
Long Dai de5cf935fb
ci: standard linter config (#199)
Signed-off-by: Long <long0dai@foxmail.com>
2021-09-22 11:02:52 -07:00
Alessandro (Ale) Segala 0dcc1509de
Do not wrap errors for invocations (#187)
Fix #186
2021-07-06 08:53:43 -07:00
wenxuwan ff2b836a2e
fix typo (#167)
Co-authored-by: 文徐 <wangwenxue.wwx@alibaba-inc.com>
2021-06-01 12:11:55 -07:00
yellow chicks b6ac9208a7
feat(state): SaveState expose StateOptions (#160)
* optimize: state consistency from strong to eventual

* feat(state): SaveState expose StateOptions

* Update state.go

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-05-04 09:08:17 -07:00
aec809a7d5
Fix #161 Add missing JSON DataContentType (#163)
Co-authored-by: Ben.li <ben.li@shapejoy.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
2021-05-04 09:03:22 -07:00
Sky/敖小剑 7f6e8c9594
update code according to queryString changed from map to string in proto definetion (#155) 2021-04-08 14:13:54 -07:00
Hugome 562562aaef
feat: add shutdown api (#151) 2021-03-25 14:45:54 +08:00
Sky/敖小剑 22f00ec23f
add bulk delete state method in client sdk (#139) 2021-02-09 13:55:34 -08:00
Yaron Schneider 8114d3f1ab
fix pub/sub example (#138) 2021-02-01 11:35:08 -08:00
Yaron Schneider b972d70edc
add support for etag and bulk secret modifications (#135) 2021-01-25 18:37:46 -08:00
gaoxinge ee170a232a
fix some typo (#131)
* fix some typo

* log format

* remove useless code
2021-01-25 18:15:56 -08:00
Sky/敖小剑 7a4b57c436
add metadata in state get response (#128) 2021-01-06 18:19:19 -08:00
landlord b6b6d06110
feat: Invoke will extract querystring from method (#127)
Co-authored-by: 李锐 <lirui@meican.com>
2020-12-15 10:07:21 -08:00
Mark Chmarny f2b03d2b4f
adds bulk secret (#126)
* adds bulk secret

* spelling
2020-12-14 17:32:18 -08:00
Mark Chmarny 12c82d50a2
streamlines names (#121)
* request method verb on service invocation

* missing args tests

* merge custom serialize

* removes IDE specific stuff from project

* consistent names
2020-12-09 11:55:49 -08:00
Mark Chmarny ec13ce3483
request method verb on service invocation (#119)
* request method verb on service invocation

* missing args tests

* merge custom serialize

* removes IDE specific stuff from project
2020-12-09 11:35:43 -08:00
Juan Carlos Zamora bd7d126b4f
Pub, service invocation methods support structs without serialization (#104)
* added PublishEventfromStruct to client

* PublishEventfromStruct refactor

* updated PublishEventfromStruct description

* fixed unit tests for PublicEventfromStruct

* added InvokeServiceWithCustomContent service invocation method supporting structs

* renamed PublishEventfromStruct to PublishEventfromCustomContent

Co-authored-by: Mark Chmarny <mchmarny@users.noreply.github.com>
2020-12-09 10:48:14 -08:00
Sky/敖小剑 32dbe98dc7
support metadata in state bulk get state (#114)
* update GetBulkState method: add metedata, change return struct to BulkStateItem

* generate code from dapr proto files; support metadata in get response

* update for code review
2020-12-07 05:33:47 -08:00
Mark Chmarny 7e8d5e580c
spelling (#110)
* v1.0.0-rc-1

* spelling

* updated cache
2020-11-24 16:34:48 -08:00
Mark Chmarny f324f4d8bb
v0.10.0-rc-1 with few dep updates (#108)
* proto dep update

* v0.10.0-rc-1

* test server closed error cache
2020-11-12 09:08:09 -08:00
Mark Chmarny d6ce657c0f
proto updates (#107) 2020-11-11 16:09:35 -08:00
Sky/敖小剑 309bf13bbe
rename SaveStateItems() to SaveBulkState(); rename GetStateItems() to GetBulkState(); (#105) 2020-11-11 05:27:19 -08:00
Mark Chmarny 0a93facbba
mchmarny coverage config (#99)
* options

* service, topic test

* binding, invoke, topic tests

* split coveage on projects

* cleaned up test

* cleaned up release test

* badge to main vs master

* madditional trace ID test

* adds secret input test

* state tests and lint
2020-10-29 10:00:15 -07:00
Sky/敖小剑 7e20fe99ea
add meta in state delete api (#82)
* add meta in state delete api

* add testcase for state delete, also cover all the get/save/delete method with meta and options
2020-09-29 03:31:41 -07:00
Mark Chmarny c368bf0455
issue 62 metadata in get state operation (#65) 2020-09-17 16:12:47 -07:00
Mark Chmarny fa162dcd0f
explicit Dapr API authentication token support (#73)
* explicit Dapr API authentication token

* avoiding race condition on api token

* allows for env var override
2020-09-17 13:28:03 -07:00