std

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MemCache = cache.NewMemCache("std", 0, 0)

* 主节点保存数据,根据配置随机选择副节点,发送数据到副节点保存,成功的节点返回

Functions

This section is empty.

Types

type StdConsensus

type StdConsensus struct {
	consensus.Consensus
}

func GetStdConsensus

func GetStdConsensus() *StdConsensus

func (*StdConsensus) ReceiveCommited

func (this *StdConsensus) ReceiveCommited(chainMessage *msg.ChainMessage) (*msg.ChainMessage, error)

*

  • vice收到commited消息,完成后,向primary发送reply消息

func (*StdConsensus) ReceiveConsensus

func (this *StdConsensus) ReceiveConsensus(chainMessage *msg.ChainMessage) (*msg.ChainMessage, error)

*

  • primary 收到消息请求,向每个follow发送commited消息 *
  • @param chainMessage
  • @return

func (*StdConsensus) ReceiveReply

func (this *StdConsensus) ReceiveReply(chainMessage *msg.ChainMessage) (*msg.ChainMessage, error)

* leader收到reply消息,判断完成后向客户就返回reply消息 与pbft的差异是pbft在上一步就完成了向客户端发送reply

Jump to

Keyboard shortcuts

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