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.

global_transaction_event.go 973 B

5 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. package event
  2. import "github.com/dk-lockdown/seata-golang/meta"
  3. const (
  4. RoleTC = "tc"
  5. RoleTM = "tm"
  6. RoleRM = "rm"
  7. )
  8. type GlobalTransactionEvent struct {
  9. id int64
  10. role string
  11. name string
  12. beginTime int64
  13. endTime int64
  14. status meta.GlobalStatus
  15. }
  16. func NewGlobalTransactionEvent(id int64,role string,name string,beginTime int64,endTime int64,status meta.GlobalStatus) GlobalTransactionEvent {
  17. return GlobalTransactionEvent{
  18. id,
  19. role,
  20. name,
  21. beginTime,
  22. endTime,
  23. status,
  24. }
  25. }
  26. func (event GlobalTransactionEvent) GetId() int64 { return event.id }
  27. func (event GlobalTransactionEvent) GetRole() string { return event.role }
  28. func (event GlobalTransactionEvent) GetName() string { return event.name }
  29. func (event GlobalTransactionEvent) GetBeginTime() int64 { return event.beginTime }
  30. func (event GlobalTransactionEvent) GetEndTime() int64 { return event.endTime }
  31. func (event GlobalTransactionEvent) GetStatus() meta.GlobalStatus { return event.status }

Go Implementation For Seata