Documentation
¶
Overview ¶
Package forwardtest holds the fakes the forwarder's tests inject: a lease view, a runner that records its calls, and a Redis clock that a test can set apart from the wall clock.
Index ¶
- type Call
- type Clock
- type LeaseView
- func (l *LeaseView) DeleteOwner(group string)
- func (l *LeaseView) Forget(string)
- func (l *LeaseView) Held(group string) (int64, bool)
- func (l *LeaseView) Owner(_ context.Context, group string) (forward.LeaseOwner, error)
- func (l *LeaseView) PastDeadline() bool
- func (l *LeaseView) SetOwner(group string, o forward.LeaseOwner)
- func (l *LeaseView) SetPast(p bool)
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
type Clock struct {
Err error
// contains filtered or unexported fields
}
Clock is a Redis clock a test sets.
type LeaseView ¶
type LeaseView struct {
Owners map[string]forward.LeaseOwner
HeldAt map[string]int64
Past bool
OwnerErr error
// contains filtered or unexported fields
}
LeaseView is a settable forward.LeaseView.
func (*LeaseView) DeleteOwner ¶
func (*LeaseView) Forget ¶
Forget is a no-op (the fake caches nothing); it lets the fake stand in for a caching view.
func (*LeaseView) PastDeadline ¶
Click to show internal directories.
Click to hide internal directories.