Back to

Package oracles

Latest Go to latest

The highest tagged major version is .

Published: Jul 7, 2019 | License: Apache-2.0 | Module:


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

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier