Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FilterArgs ¶
type FilterArgs struct { Ctx context.Context CmdID CmdIDKey Index int Sid roachpb.StoreID Req roachpb.Request Hdr roachpb.Header }
FilterArgs groups the arguments to a ReplicaCommandFilter.
func (*FilterArgs) InRaftCmd ¶
func (f *FilterArgs) InRaftCmd() bool
InRaftCmd returns true if the filter is running in the context of a Raft command (it could be running outside of one, for example for a read).
type ReplicaCommandFilter ¶
type ReplicaCommandFilter func(args FilterArgs) *roachpb.Error
ReplicaCommandFilter may be used in tests through the StorageTestingMocker to intercept the handling of commands and artificially generate errors. Return nil to continue with regular processing or non-nil to terminate processing with the returned error. Note that in a multi-replica test this filter will be run once for each replica and must produce consistent results each time.
Click to show internal directories.
Click to hide internal directories.