Documentation ¶
Index ¶
- type Store
- func (s *Store) ChangeGlobalStatus(global *storage.TransGlobalStore, newStatus string, updates []string, ...)
- func (s *Store) CreateKV(cat, key, value string) error
- func (s *Store) DeleteKV(cat, key string) error
- func (s *Store) FindBranches(gid string) []storage.TransBranchStore
- func (s *Store) FindKV(cat, key string) []storage.KVStore
- func (s *Store) FindTransGlobalStore(gid string) (trans *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) ResetCronTime(after time.Duration, limit int64) (succeedCount int64, hasRemaining bool, err error)
- func (s *Store) ScanKV(cat string, position *string, limit int64) []storage.KVStore
- 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)
- func (s *Store) UpdateKV(kv *storage.KVStore) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements storage.Store, and storage with boltdb
func (*Store) ChangeGlobalStatus ¶
func (s *Store) ChangeGlobalStatus(global *storage.TransGlobalStore, newStatus string, updates []string, finished bool)
ChangeGlobalStatus changes global trans status
func (*Store) FindBranches ¶
func (s *Store) FindBranches(gid string) []storage.TransBranchStore
FindBranches finds Branch data by gid
func (*Store) FindTransGlobalStore ¶
func (s *Store) FindTransGlobalStore(gid string) (trans *storage.TransGlobalStore)
FindTransGlobalStore finds GlobalTrans data by gid
func (*Store) LockGlobalSaveBranches ¶
func (s *Store) LockGlobalSaveBranches(gid string, status string, branches []storage.TransBranchStore, branchStart int)
LockGlobalSaveBranches creates branches
func (*Store) LockOneGlobalTrans ¶
func (s *Store) LockOneGlobalTrans(expireIn time.Duration) *storage.TransGlobalStore
LockOneGlobalTrans finds GlobalTrans
func (*Store) MaySaveNewTrans ¶
func (s *Store) MaySaveNewTrans(global *storage.TransGlobalStore, branches []storage.TransBranchStore) error
MaySaveNewTrans creates a new trans
func (*Store) PopulateData ¶
PopulateData populates data to boltdb
func (*Store) ResetCronTime ¶
func (s *Store) ResetCronTime(after time.Duration, limit int64) (succeedCount int64, hasRemaining bool, err error)
ResetCronTime reset nextCronTime unfinished transactions need to be retried as soon as possible after business downtime is recovered
func (*Store) ScanTransGlobalStores ¶
func (s *Store) ScanTransGlobalStores(position *string, limit int64) []storage.TransGlobalStore
ScanTransGlobalStores lists GlobalTrans data
func (*Store) TouchCronTime ¶
func (s *Store) TouchCronTime(global *storage.TransGlobalStore, nextCronInterval int64, nextCronTime *time.Time)
TouchCronTime updates cronTime
func (*Store) UpdateBranches ¶
UpdateBranches update branches info
Click to show internal directories.
Click to hide internal directories.