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.

service.go 775 B

123456789101112131415161718192021222324252627282930
  1. package main
  2. import (
  3. "context"
  4. "github.com/seata/seata-go/pkg/common/log"
  5. "github.com/seata/seata-go/pkg/tm"
  6. )
  7. type RMService struct {
  8. }
  9. func (b *RMService) Prepare(ctx context.Context, params interface{}) (bool, error) {
  10. log.Infof("TRMService Prepare, param %v", params)
  11. return true, nil
  12. }
  13. func (b *RMService) Commit(ctx context.Context, businessActionContext *tm.BusinessActionContext) (bool, error) {
  14. log.Infof("RMService Commit, param %v", businessActionContext)
  15. return true, nil
  16. }
  17. func (b *RMService) Rollback(ctx context.Context, businessActionContext *tm.BusinessActionContext) (bool, error) {
  18. log.Infof("RMService Rollback, param %v", businessActionContext)
  19. return true, nil
  20. }
  21. func (b *RMService) GetActionName() string {
  22. return "ginTccRMService"
  23. }