Documentation
¶
Overview ¶
Package simcluster runs an in-process multi-node Zattera control plane for unit and chaos tests: real hashicorp/raft with in-memory transports, real FSM/state, fake container runtime, fake clock. No Docker, no network.
It is the backbone of scheduler, HA and failover verification: kill the leader, partition nodes, advance time, assert convergence.
Index ¶
- type Cluster
- func (c *Cluster) Apply(cmd *clusterv1.Command) error
- func (c *Cluster) Heal()
- func (c *Cluster) Kill(id string)
- func (c *Cluster) KillLeader() string
- func (c *Cluster) Leader() *Node
- func (c *Cluster) Partition(groups ...[]string)
- func (c *Cluster) Shutdown()
- func (c *Cluster) WaitLeader(timeout time.Duration) *Node
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
Cluster is a set of interconnected nodes sharing one fake clock.
func (*Cluster) Apply ¶
Apply proposes a command on the current leader, retrying across elections until timeout. Business errors are returned immediately.
func (*Cluster) KillLeader ¶
KillLeader crashes the current leader and returns its id.
Click to show internal directories.
Click to hide internal directories.