tidb: github.com/pingcap/tidb/store/tikv/oracle/oracles Index | Files

package oracles

import "github.com/pingcap/tidb/store/tikv/oracle/oracles"

Index

Package Files

local.go pd.go

func NewLocalOracle Uses

func NewLocalOracle() oracle.Oracle

NewLocalOracle creates an Oracle that uses local time as data source.

func NewPdOracle Uses

func NewPdOracle(pdClient pd.Client, updateInterval time.Duration) (oracle.Oracle, error)

NewPdOracle create an Oracle that uses a pd client source. Refer https://github.com/pingcap/pd/blob/master/client/client.go for more details. PdOracle mantains `lastTS` to store the last timestamp got from PD server. If `GetTimestamp()` is not called after `updateInterval`, it will be called by itself to keep up with the timestamp on PD server.

Package oracles imports 10 packages (graph) and is imported by 7 packages. Updated 2019-06-12. Refresh now. Tools for package owners.