sim

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bug

type Bug uint8
const (
	NoBug Bug = iota
	BugSendBeforePersist
	BugForgetVote
	BugEarlyAck
	BugStaleRead
)

type Op added in v0.1.2

type Op struct {
	Kind    byte
	Key     int
	Value   string
	Output  string
	Call    int64
	Return  int64
	Unknown bool
	// contains filtered or unexported fields
}

type Options

type Options struct {
	Seed        uint64
	Nodes       int
	PreVote     bool
	CheckQuorum bool
	Bug         Bug
	KV          bool
	Members     bool
	Lease       bool
}

type Sim

type Sim struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) *Sim

func (*Sim) Calms

func (s *Sim) Calms() int

func (*Sim) History added in v0.1.2

func (s *Sim) History() []Op

func (*Sim) Run

func (s *Sim) Run(steps int64) (err error)

func (*Sim) Steps

func (s *Sim) Steps() int64

Jump to

Keyboard shortcuts

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