Documentation ¶
Index ¶
- func NewBarrier(desc string, n int, cb func()) *barrier
- type Action
- type ErrKey
- type TestNode
- func (n *TestNode) Activate(rID api.RangeID) error
- func (n *TestNode) AddBarrier(t *testing.T, rID api.RangeID, src api.RemoteState) *barrier
- func (n *TestNode) Deactivate(rID api.RangeID) error
- func (n *TestNode) Drop(rID api.RangeID) error
- func (n *TestNode) ForceDrop(rID api.RangeID)
- func (n *TestNode) GetLoadInfo(rID api.RangeID) (api.LoadInfo, error)
- func (n *TestNode) Listen(ctx context.Context, srv *grpc.Server) func()
- func (n *TestNode) Prepare(m api.Meta, p []api.Parent) error
- func (n *TestNode) RPCs() []interface{}
- func (n *TestNode) Ranges(ctx context.Context, req *pb.RangesRequest) (*pb.RangesResponse, error)
- func (n *TestNode) SetGracePeriod(d time.Duration)
- func (n *TestNode) SetReturnValue(t *testing.T, rID api.RangeID, act Action, err error)
- func (n *TestNode) SetStrictTransitions(b bool)
- func (n *TestNode) SetWantDrain(b bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBarrier ¶
Types ¶
type TestNode ¶
type TestNode struct { Addr string Conn *grpc.ClientConn // contains filtered or unexported fields }
func NewTestNode ¶
func (*TestNode) AddBarrier ¶
func (*TestNode) GetLoadInfo ¶
func (*TestNode) RPCs ¶
func (n *TestNode) RPCs() []interface{}
RPCs returns a slice of the (proto) requests received by this node since the last time that this method was called, in a deterministic-ish order. This is an ugly hack because asserting that an unordered bunch of protos were all sent is hard.
func (*TestNode) Ranges ¶
func (n *TestNode) Ranges(ctx context.Context, req *pb.RangesRequest) (*pb.RangesResponse, error)
func (*TestNode) SetGracePeriod ¶
func (*TestNode) SetReturnValue ¶
SetReturnValue sets the value which should be returned from the given action (i.e. one of the state-transitioning methods of the Rangelet interface) for the given range on this test node.
func (*TestNode) SetStrictTransitions ¶
func (*TestNode) SetWantDrain ¶
Click to show internal directories.
Click to hide internal directories.