mirror of https://github.com/dtm-labs/dtm.git
csharpjavadistributed-transactionsdtmgogolangmicroservicenodejsphpdatabasesagaseatatcctransactiontransactionsxapythondistributed
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
921 B
38 lines
921 B
import { AxiosResponse } from 'axios'
|
|
import request from '/@/utils/request'
|
|
|
|
export interface IListAllTransactionsReq {
|
|
limit: number
|
|
position?: string
|
|
}
|
|
|
|
export function listAllTransactions<T>(payload: IListAllTransactionsReq): Promise<AxiosResponse<T>> {
|
|
return request({
|
|
url: '/api/dtmsvr/all',
|
|
method: 'get',
|
|
params: payload
|
|
})
|
|
}
|
|
|
|
export function forceStopTransaction(gid: string): Promise<AxiosResponse> {
|
|
return request({
|
|
url: '/api/dtmsvr/forceStop',
|
|
method: 'post',
|
|
data: { gid },
|
|
})
|
|
}
|
|
|
|
export function getTransaction<T>(payload: { gid: string }): Promise<AxiosResponse<T>> {
|
|
return request({
|
|
url: '/api/dtmsvr/query',
|
|
method: 'get',
|
|
params: payload
|
|
})
|
|
}
|
|
|
|
export function getDtmVersion(): Promise<AxiosResponse<any>> {
|
|
return request({
|
|
url: '/api/dtmsvr/version',
|
|
method: 'get',
|
|
})
|
|
}
|
|
|