oracle

package
v0.0.0-...-3056823 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComposeTS

func ComposeTS(physical, logical int64) uint64

ComposeTS creates a ts from physical and logical parts.

func ExtractPhysical

func ExtractPhysical(ts uint64) int64

ExtractPhysical returns a ts's physical part.

func GetPhysical

func GetPhysical(t time.Time) int64

GetPhysical returns physical from an instant time with millisecond precision.

Types

type Oracle

type Oracle interface {
	GetTimestamp() (uint64, error)
	IsExpired(lockTimestamp uint64, TTL uint64) bool
	Close()
}

Oracle is the interface that provides strictly ascending timestamps.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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