You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

tcc_resource.go 637 B

3 years ago
123456789101112131415161718192021222324252627282930313233
  1. package tcc
  2. import (
  3. "reflect"
  4. )
  5. import (
  6. "github.com/seata/seata-go/pkg/model"
  7. )
  8. type TCCResource struct {
  9. ResourceGroupId string `default:"DEFAULT"`
  10. AppName string
  11. ActionName string
  12. TargetBean interface{}
  13. PrepareMethod reflect.Method
  14. CommitMethodName string
  15. CommitMethod reflect.Method
  16. RollbackMethodName string
  17. RollbackMethod reflect.Method
  18. }
  19. func (t *TCCResource) GetResourceGroupId() string {
  20. return t.ResourceGroupId
  21. }
  22. func (t *TCCResource) GetResourceId() string {
  23. return t.ActionName
  24. }
  25. func (t *TCCResource) GetBranchType() model.BranchType {
  26. return model.TCC
  27. }

Go Implementation For Seata