Documentation ¶
Index ¶
- func CheckEvents(model Model, history []Event) bool
- func CheckEventsTimeout(model Model, history []Event, timeout time.Duration) bool
- func CheckOperations(model Model, history []Operation) bool
- func CheckOperationsTimeout(model Model, history []Operation, timeout time.Duration) bool
- func NoPartition(history []Operation) [][]Operation
- func NoPartitionEvent(history []Event) [][]Event
- func ShallowEqual(state1, state2 interface{}) bool
- type Event
- type EventKind
- type Model
- type Operation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckEvents ¶
func CheckEventsTimeout ¶
timeout = 0 means no timeout if this operation times out, then a false positive is possible
func CheckOperations ¶
func CheckOperationsTimeout ¶
timeout = 0 means no timeout if this operation times out, then a false positive is possible
func NoPartition ¶
func NoPartitionEvent ¶
func ShallowEqual ¶
func ShallowEqual(state1, state2 interface{}) bool
Types ¶
type Event ¶
func ParseJepsenLog ¶
type Model ¶
type Model struct { // Partition functions, such that a history is linearizable if an only // if each partition is linearizable. If you don't want to implement // this, you can always use the `NoPartition` functions implemented // below. Partition func(history []Operation) [][]Operation PartitionEvent func(history []Event) [][]Event // Initial state of the system. Init func() interface{} // Step function for the system. Returns whether or not the system // could take this step with the given inputs and outputs and also // returns the new state. This should not mutate the existing state. Step func(state interface{}, input interface{}, output interface{}) (bool, interface{}) // Equality on states. If you are using a simple data type for states, // you can use the `ShallowEqual` function implemented below. Equal func(state1, state2 interface{}) bool }
func GetEtcdModel ¶
func GetEtcdModel() Model
Click to show internal directories.
Click to hide internal directories.