Documentation ¶
Index ¶
- func GetAddress(url string) string
- func StartQcpConsume(conf *config.Config) (err error)
- type ConsEngine
- func (c *ConsEngine) Add2Engine(data []byte) error
- func (c *ConsEngine) GetSequenceFromChain(from, to, inout string) (int64, error)
- func (c *ConsEngine) Getfrom() string
- func (c *ConsEngine) Getto() string
- func (c *ConsEngine) RoomKeeper()
- func (c *ConsEngine) SetSequence(from, to string, s int64)
- func (c *ConsEngine) Setfrom(from string)
- func (c *ConsEngine) Setto(to string)
- func (c *ConsEngine) StartEngine() error
- type Consensus
- type ConsensusMap
- type EngineMap
- type Ferry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartQcpConsume ¶ added in v0.1.0
StartQcpConsume Start to consume tx msg
Types ¶
type ConsEngine ¶
ConsEngine Consensus engine
func NewConsEngine ¶
func NewConsEngine(from, to string) *ConsEngine
NewConsEngine New a consensus engine
func (*ConsEngine) Add2Engine ¶
func (c *ConsEngine) Add2Engine(data []byte) error
Add2Engine Add a message to consensus engine
func (*ConsEngine) GetSequenceFromChain ¶ added in v0.0.3
func (c *ConsEngine) GetSequenceFromChain(from, to, inout string) (int64, error)
GetSequenceFromChain 在to chain上查询 来自/要去 from chain 的 sequence
func (*ConsEngine) Getfrom ¶ added in v0.1.0
func (c *ConsEngine) Getfrom() string
Getfrom return from value
func (*ConsEngine) Getto ¶ added in v0.1.0
func (c *ConsEngine) Getto() string
Getto returns to value
func (*ConsEngine) RoomKeeper ¶ added in v0.1.0
func (c *ConsEngine) RoomKeeper()
RoomKeeper 清理 EngineMap,ConsensusMap过时k-v;校正sequence
func (*ConsEngine) SetSequence ¶
func (c *ConsEngine) SetSequence(from, to string, s int64)
SetSequence 设置交易序列号
func (*ConsEngine) Setfrom ¶ added in v0.1.0
func (c *ConsEngine) Setfrom(from string)
Setfrom set from value
func (*ConsEngine) StartEngine ¶
func (c *ConsEngine) StartEngine() error
StartEngine 启动共识引擎尝试处理下一个交易
type ConsensusMap ¶ added in v0.0.3
type ConsensusMap struct { ConsMap map[int64]map[string]string // contains filtered or unexported fields }
func (*ConsensusMap) AddConsToMap ¶ added in v0.0.3
func (c *ConsensusMap) AddConsToMap(sequence int64, hash, nodes string) error
func (*ConsensusMap) GetConsFromMap ¶ added in v0.0.3
func (c *ConsensusMap) GetConsFromMap(sequence int64) (*Consensus, error)
type EngineMap ¶ added in v0.0.3
type Ferry ¶
type Ferry struct { ConsMap *ConsensusMap // contains filtered or unexported fields }
Ferry Comsumer tx message and handle(consensus, broadcast...) it.
func (*Ferry) GetSequenceFromChain ¶ added in v0.0.3
GetSequenceFromChain 在to chain上查询 来自/要去 from chain 的 sequence
func (*Ferry) SetSequence ¶ added in v0.0.3
SetSequence 设置交易序列号
func (*Ferry) StartFerry ¶ added in v0.0.3
StartFerry 启动共识引擎尝试处理下一个交易
Click to show internal directories.
Click to hide internal directories.