Documentation ¶
Index ¶
- type MockOracle
- func (o *MockOracle) AddOffset(d time.Duration)
- func (o *MockOracle) Close()
- func (o *MockOracle) Disable()
- func (o *MockOracle) Enable()
- func (o *MockOracle) GetTimestamp(context.Context) (uint64, error)
- func (o *MockOracle) GetTimestampAsync(ctx context.Context) oracle.Future
- func (o *MockOracle) IsExpired(lockTimestamp uint64, TTL uint64) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockOracle ¶
MockOracle is a mock oracle for test.
func (*MockOracle) AddOffset ¶
func (o *MockOracle) AddOffset(d time.Duration)
AddOffset adds the offset of the oracle.
func (*MockOracle) GetTimestamp ¶
func (o *MockOracle) GetTimestamp(context.Context) (uint64, error)
GetTimestamp implements oracle.Oracle interface.
func (*MockOracle) GetTimestampAsync ¶
func (o *MockOracle) GetTimestampAsync(ctx context.Context) oracle.Future
GetTimestampAsync implements oracle.Oracle interface.
Click to show internal directories.
Click to hide internal directories.