incubator-seata-go
incubator-seata-go copied to clipboard
optimize: support instance BusinessActionContext outside the TCC try …
…method
What this PR does:
- During the prepare method of TCC, users can manually pass in BusinessActionContext parameters to facilitate user-defined parameters
- TwoPhaseAction interface’s prepare function parameters change from Prepare(ctx context.Context, params ...interface{}) (bool, error) to Prepare(ctx context.Context, params interface{}) (bool, error), for easy to parse parameters
Which issue(s) this PR fixes:
Fixes #178
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
pls fix the confliction.
Codecov Report
Merging #179 (7f9da7b) into master (5e42d8e) will increase coverage by
2.68%
. The diff coverage is81.89%
.
@@ Coverage Diff @@
## master #179 +/- ##
==========================================
+ Coverage 61.61% 64.29% +2.68%
==========================================
Files 48 48
Lines 1941 2028 +87
==========================================
+ Hits 1196 1304 +108
+ Misses 687 660 -27
- Partials 58 64 +6
Impacted Files | Coverage Δ | |
---|---|---|
pkg/tm/context.go | 77.77% <ø> (ø) |
|
pkg/rm/two_phase.go | 67.57% <40.00%> (-2.47%) |
:arrow_down: |
pkg/rm/tcc/tcc_service.go | 65.40% <85.84%> (+65.40%) |
:arrow_up: |
pkg/rm/tcc/tcc_resource.go | 37.89% <0.00%> (+8.42%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.