Documentation
¶
Index ¶
- func SetDBConn(db *gorm.DB)
- type Store
- func (s *Store) ChangeGlobalStatus(global *storage.TransGlobalStore, newStatus string, updates []string, ...)
- func (s *Store) FindBranches(gid string) []storage.TransBranchStore
- func (s *Store) FindTransGlobalStore(gid string) *storage.TransGlobalStore
- func (s *Store) LockGlobalSaveBranches(gid string, status string, branches []storage.TransBranchStore, ...)
- func (s *Store) LockOneGlobalTrans(expireIn time.Duration) *storage.TransGlobalStore
- func (s *Store) MaySaveNewTrans(global *storage.TransGlobalStore, branches []storage.TransBranchStore) error
- func (s *Store) Ping() error
- func (s *Store) PopulateData(skipDrop bool)
- func (s *Store) ScanTransGlobalStores(position *string, limit int64) []storage.TransGlobalStore
- func (s *Store) TouchCronTime(global *storage.TransGlobalStore, nextCronInterval int64)
- func (s *Store) UpdateBranches(branches []storage.TransBranchStore, updates []string) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Store ¶ added in v1.9.1
type Store struct { }
Store implements storage.Store, and storage with db
func (*Store) ChangeGlobalStatus ¶ added in v1.9.1
func (s *Store) ChangeGlobalStatus(global *storage.TransGlobalStore, newStatus string, updates []string, finished bool)
ChangeGlobalStatus changes global trans status
func (*Store) FindBranches ¶ added in v1.9.1
func (s *Store) FindBranches(gid string) []storage.TransBranchStore
FindBranches finds Branch data by gid
func (*Store) FindTransGlobalStore ¶ added in v1.9.1
func (s *Store) FindTransGlobalStore(gid string) *storage.TransGlobalStore
FindTransGlobalStore finds GlobalTrans data by gid
func (*Store) LockGlobalSaveBranches ¶ added in v1.9.1
func (s *Store) LockGlobalSaveBranches(gid string, status string, branches []storage.TransBranchStore, branchStart int)
LockGlobalSaveBranches creates branches
func (*Store) LockOneGlobalTrans ¶ added in v1.9.1
func (s *Store) LockOneGlobalTrans(expireIn time.Duration) *storage.TransGlobalStore
LockOneGlobalTrans finds GlobalTrans
func (*Store) MaySaveNewTrans ¶ added in v1.9.1
func (s *Store) MaySaveNewTrans(global *storage.TransGlobalStore, branches []storage.TransBranchStore) error
MaySaveNewTrans creates a new trans
func (*Store) PopulateData ¶ added in v1.9.1
PopulateData populates data to db
func (*Store) ScanTransGlobalStores ¶ added in v1.9.1
func (s *Store) ScanTransGlobalStores(position *string, limit int64) []storage.TransGlobalStore
ScanTransGlobalStores lists GlobalTrans data
func (*Store) TouchCronTime ¶ added in v1.9.1
func (s *Store) TouchCronTime(global *storage.TransGlobalStore, nextCronInterval int64)
TouchCronTime updates cronTime
func (*Store) UpdateBranches ¶ added in v1.9.1
UpdateBranches update branches info
Click to show internal directories.
Click to hide internal directories.