package
0.3.5
Repository: https://github.com/netrixframework/netrix.git
Documentation: pkg.go.dev

# Functions

DeliverAll returns an action which inturn returns all the messages in the message set and removes the messages from the set.
DeliverMessage returns the message if the event is a message send event.
DropMessage returns an empty list of messages.
If creates a IfThenHandler with the specified condition.
IncrCounter returns an action which increments the counter value.
IsMessageAcrossPartition condition returns true when the event represents a message between replicas of different partitions.
IsMessageFromPart condition returns true when message is from a replica that belongs to the specified part.
IsMessageWithinPartition condition returns true when the event represents a message between two replicas of the same partition.
IsolateNode is a filter that drops all messages from and to the specified replica.
NewContext instantiates a Context from the RootContext.
NewContextFrom instantiates a context from the specified state machine context and testcase.
NewFilterSet creates a new cascade handler with the specified state machine and options.
NewRandomPartition creates a partition where replicas are assigned to partitions randomly.
NewStateMachineHandler returns a HandlerFunc that encodes the execution logic of the StateMachine For every invocation of the handler, internal a state machine step is executed which may or may not transition.
NewTestCase instantiates a TestCase based on the parameters specified The new testcase has three states by default.
No description provided by the author
NewTestingServer instantiates TestingServer testcases are passed as arguments.
No description provided by the author
RecordMessageAs returns an action.
Store returns an action.
WithDefault changes the HandlerCascade default handler.

# Variables

ErrNotEnoughReplicas occurs when creating a partition with a total size greater than the existing number of replicas.
ErrSizeLabelsMismatch occurs when the number of labels does not match the number of partitions.

# Structs

Context struct is passed to the calls of StateAction and Condition encapsulates all information needed by the StateAction and Condition to function.
FilterSet implements Handler Executes handlers in the specified order until the event is handled If no handler handles the event then the default handler is called.
FilterSetStats keeps a count of the number of times a filter condition was satisfied for a given filter The filter index is the order in which the filter is specified.
IfThenHandler struct is used to wrap the attributes of the `If().Then()` handler.
Partition represents a logical partition between the replicas Partition can be used in filters and conditions to decide message delivery.
TestCase represents a unit test case.
TestingServer is used to run the scheduler tool for unit testing.

# Type aliases

Action is used to specify the consequence in the `If().Then()` handler.
FilterFunc type to define a conditional handler returns false in the second return value if the handler is not concerned about the event.
FilterSetOption changes the parameters of the HandlerCascade.