in tcc/dubbo/client/service/user_provider.go [36:51]
func NewTwoPhaseDemoService() *UserProvider {
return &UserProvider{
Prepare: func(ctx context.Context, params ...interface{}) (bool, error) {
return false, fmt.Errorf("execute two phase prepare method, param %v", params)
},
Commit: func(ctx context.Context, businessActionContext *tm.BusinessActionContext) (bool, error) {
return false, fmt.Errorf("execute two phase commit method, xid %v", businessActionContext.Xid)
},
Rollback: func(ctx context.Context, businessActionContext *tm.BusinessActionContext) (bool, error) {
return true, nil
},
GetActionName: func() string {
return "TwoPhaseDemoService"
},
}
}