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.

transaction_role.go 375 B

5 years ago
123456789101112131415161718192021222324252627282930313233
  1. package meta
  2. import "fmt"
  3. type TransactionRole byte
  4. const (
  5. /**
  6. * tm
  7. */
  8. TMROLE TransactionRole = iota
  9. /**
  10. * rm
  11. */
  12. RMROLE
  13. /**
  14. * server
  15. */
  16. SERVERROLE
  17. )
  18. func (r TransactionRole) String() string {
  19. switch r {
  20. case TMROLE:
  21. return "TMROLE"
  22. case RMROLE:
  23. return "RMROLE"
  24. case SERVERROLE:
  25. return "SERVERROLE"
  26. default:
  27. return fmt.Sprintf("%d", r)
  28. }
  29. }

Go Implementation For Seata