Browse Source

add XaSqlTimeoutMs

pull/61/head
yedf2 4 years ago
parent
commit
ab39e6ce7c
  1. 3
      dtmcli/dtmimp/vars.go
  2. 10
      dtmcli/types.go

3
dtmcli/dtmimp/vars.go

@ -18,6 +18,9 @@ var ErrFailure = errors.New("FAILURE")
// ErrOngoing error of ONGOING
var ErrOngoing = errors.New("ONGOING")
// XaSqlTimeoutMs milliseconds for Xa sql to timeout
var XaSqlTimeoutMs = 15000
// MapSuccess HTTP result of SUCCESS
var MapSuccess = map[string]interface{}{"dtm_result": ResultSuccess}

10
dtmcli/types.go

@ -37,3 +37,13 @@ func SetCurrentDBType(dbType string) {
func GetCurrentDBType() string {
return dtmimp.GetCurrentDBType()
}
// SetXaSqlTimeoutMs set XaSqlTimeoutMs
func XaSqlTimeoutMs(ms int) {
dtmimp.XaSqlTimeoutMs = ms
}
// GetXaSqlTimeoutMs get XaSqlTimeoutMs
func GetXaSqlTimeoutMs() int {
return dtmimp.XaSqlTimeoutMs
}

Loading…
Cancel
Save