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) GetLowResolutionTimestamp(ctx context.Context) (uint64, error)
- func (o *MockOracle) GetLowResolutionTimestampAsync(ctx context.Context) oracle.Future
- 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
- func (o *MockOracle) UntilExpired(lockTimeStamp uint64, TTL uint64) int64
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) GetLowResolutionTimestamp ¶
func (o *MockOracle) GetLowResolutionTimestamp(ctx context.Context) (uint64, error)
GetLowResolutionTimestamp implements oracle.Oracle interface.
func (*MockOracle) GetLowResolutionTimestampAsync ¶
func (o *MockOracle) GetLowResolutionTimestampAsync(ctx context.Context) oracle.Future
GetLowResolutionTimestampAsync implements oracle.Oracle interface.
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.
func (*MockOracle) IsExpired ¶
func (o *MockOracle) IsExpired(lockTimestamp uint64, TTL uint64) bool
IsExpired implements oracle.Oracle interface.
func (*MockOracle) UntilExpired ¶
func (o *MockOracle) UntilExpired(lockTimeStamp uint64, TTL uint64) int64
UntilExpired implement oracle.Oracle interface.
Click to show internal directories.
Click to hide internal directories.