oracles

package
v2.1.0-rc.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: Apache-2.0 Imports: 9 Imported by: 234

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalOracle

func NewLocalOracle() oracle.Oracle

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

func NewPdOracle

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/pd-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.

Types

This section is empty.

Jump to

Keyboard shortcuts

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