storagebase

package
v0.0.0-...-872dfdc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CmdIDKey

type CmdIDKey string

CmdIDKey is a Raft command id.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL