dtmsvr

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2021 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CronForwardDuration time.Duration = time.Duration(0)

CronForwardDuration will be set in test. cron will fetch trans which expire in CronForwardDuration

View Source
var NowForwardDuration time.Duration = time.Duration(0)

NowForwardDuration will be set in test, trans may be timeout

View Source
var TransProcessedTestChan chan string = nil

TransProcessedTestChan only for test usage. when transaction processed once, write gid to this chan

View Source
var UpdateBranchAsyncInterval = 200 * time.Millisecond

UpdateBranchAsyncInterval interval to flush branch

Functions

func CronExpiredTrans

func CronExpiredTrans(num int)

CronExpiredTrans cron expired trans, num == -1 indicate for ever

func CronTransOnce

func CronTransOnce() (gid string)

CronTransOnce cron expired trans. use expireIn as expire time

func GenGid

func GenGid() string

GenGid generate gid, use uuid

func GetStore added in v1.7.0

func GetStore() storage.Store

func PopulateDB added in v0.10.0

func PopulateDB(skipDrop bool)

PopulateDB setup mysql data

func StartSvr

func StartSvr()

StartSvr StartSvr

Types

type TransBranch

type TransBranch = storage.TransBranchStore

TransBranch branch transaction

type TransGlobal

type TransGlobal struct {
	storage.TransGlobalStore
	// contains filtered or unexported fields
}

TransGlobal global transaction

func GetTransGlobal added in v1.7.0

func GetTransGlobal(gid string) *TransGlobal

GetTransGlobal construct trans from db

func TransFromContext

func TransFromContext(c *gin.Context) *TransGlobal

TransFromContext TransFromContext

func TransFromDtmRequest added in v0.10.0

func TransFromDtmRequest(c *dtmgimp.DtmRequest) *TransGlobal

TransFromDtmRequest TransFromContext

func (*TransGlobal) Process

func (t *TransGlobal) Process() map[string]interface{}

Process process global transaction once

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL