rafttest

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConfiguration

func CheckConfiguration(c *gc.C, r *raft.Raft, expectedServers []raft.Server)

CheckConfiguration waits some time for the Raft to have the expected server configuration.

Types

type RaftFixture

type RaftFixture struct {
	testing.IsolationSuite

	FSM           raft.FSM
	Config        *raft.Config
	Transport     *raft.InmemTransport
	Store         *raft.InmemStore
	SnapshotStore *raft.InmemSnapshotStore
	Raft          *raft.Raft
}

RaftFixture is a fixture to embed into test suites, providing a raft.Raft and in-memory transport.

func (*RaftFixture) DefaultConfig

func (s *RaftFixture) DefaultConfig(id raft.ServerID) *raft.Config

func (*RaftFixture) NewRaft

func (*RaftFixture) SetUpTest

func (s *RaftFixture) SetUpTest(c *gc.C)

Jump to

Keyboard shortcuts

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