pbft

package
v0.0.0-...-08e435a Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BFTMsg

type BFTMsg struct {
	SyncSign
	// contains filtered or unexported fields
}

2f + 1

type Blacklist

type Blacklist interface {
	Add(key interface{})
	AddAddTimeout(key interface{}, duration time.Duration)
	Exists(key interface{}) bool
	Remove(key interface{})
}

Blacklist define a data set interface with a timeout

func NewBlacklist

func NewBlacklist() (Blacklist, error)

NewBlacklist returns timeout blacklist

type Cli

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

func (*Cli) GetCh

func (c *Cli) GetCh() (chan<- interface{}, error)

func (*Cli) SendRequest

func (c *Cli) SendRequest(op string) error

type CurState

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

0. waiting request 1. waiting 2f+1 prepare 2. waiting 2f+1 commit 3. waiting 2f+1 view change

type HeartBeatMsg

type HeartBeatMsg struct {
	SyncSign
	// contains filtered or unexported fields
}

type Net

type Net interface {
	SendTo(fromId uint32, toId uint32, msg interface{}) error

	Register(id uint32, wCh chan<- interface{}) error
	UnRegister(id uint32) error

	SetStatus(idx uint32, flag bool) // true:up false:down
}

type NewViewMsg

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

type Node

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

func (*Node) GetCh

func (n *Node) GetCh() (chan<- interface{}, error)

type NodeMsg

type NodeMsg interface {
	// contains filtered or unexported methods
}

node to node

type PPMsg

type PPMsg struct {
	SyncSign
	// contains filtered or unexported fields
}

just from master

type PrimaryDown

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

type ReplyMsg

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

f + 1

type ReqMsg

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

just from client

type State

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

type StateCounter

type StateCounter interface {
	Ok(key string) bool
	Done(key string, idx uint32) error
	Destroy() error
}

type SyncMsg

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

type SyncSign

type SyncSign interface {
}

type ViewChangeMsg

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

Jump to

Keyboard shortcuts

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