tidb: github.com/pingcap/tidb/store/mockoracle Index | Files

package mockoracle

import "github.com/pingcap/tidb/store/mockoracle"

Index

Package Files

oracle.go

type MockOracle Uses

type MockOracle struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

MockOracle is a mock oracle for test.

func (*MockOracle) AddOffset Uses

func (o *MockOracle) AddOffset(d time.Duration)

AddOffset adds the offset of the oracle.

func (*MockOracle) Close Uses

func (o *MockOracle) Close()

Close implements oracle.Oracle interface.

func (*MockOracle) Disable Uses

func (o *MockOracle) Disable()

Disable disables the Oracle

func (*MockOracle) Enable Uses

func (o *MockOracle) Enable()

Enable enables the Oracle

func (*MockOracle) GetLowResolutionTimestamp Uses

func (o *MockOracle) GetLowResolutionTimestamp(ctx context.Context) (uint64, error)

GetLowResolutionTimestamp implements oracle.Oracle interface.

func (*MockOracle) GetLowResolutionTimestampAsync Uses

func (o *MockOracle) GetLowResolutionTimestampAsync(ctx context.Context) oracle.Future

GetLowResolutionTimestampAsync implements oracle.Oracle interface.

func (*MockOracle) GetTimestamp Uses

func (o *MockOracle) GetTimestamp(context.Context) (uint64, error)

GetTimestamp implements oracle.Oracle interface.

func (*MockOracle) GetTimestampAsync Uses

func (o *MockOracle) GetTimestampAsync(ctx context.Context) oracle.Future

GetTimestampAsync implements oracle.Oracle interface.

func (*MockOracle) IsExpired Uses

func (o *MockOracle) IsExpired(lockTimestamp uint64, TTL uint64) bool

IsExpired implements oracle.Oracle interface.

func (*MockOracle) UntilExpired Uses

func (o *MockOracle) UntilExpired(lockTimeStamp uint64, TTL uint64) int64

UntilExpired implement oracle.Oracle interface.

Package mockoracle imports 5 packages (graph). Updated 2019-07-10. Refresh now. Tools for package owners.