Documentation ¶
Index ¶
- type LocalTree
- func (p *LocalTree) FinishGenesis(depth uint8, lastGenesisPulse pulse.Number)
- func (p *LocalTree) GenesisPulse() pulse.Number
- func (p *LocalTree) GetTrees(pn pulse.Number) (prev, cur jet.PrefixTree, ok bool)
- func (p *LocalTree) Init(managed.Holder)
- func (p *LocalTree) IsGenesisFinished() bool
- func (p *LocalTree) PulseMigration(_ managed.Holder, pr pulse.Range)
- func (p *LocalTree) SplitNext(id jet.DropID)
- func (p *LocalTree) Start(managed.Holder)
- func (p *LocalTree) Stop(managed.Holder)
- func (p *LocalTree) TryLockGenesis(pn pulse.Number) bool
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalTree ¶
type LocalTree struct {
// contains filtered or unexported fields
}
func (*LocalTree) FinishGenesis ¶
func (*LocalTree) GenesisPulse ¶
func (*LocalTree) IsGenesisFinished ¶
func (*LocalTree) PulseMigration ¶
type Service ¶
type Service interface { // GetTrees provides previous and current jet trees. For genesis-state both trees will be empty. // Pulse number is required to enforce synchronicity between the service and the caller. // When current pulse number is mismatched, then (found)==false and trees are empty. GetTrees(pulse.Number) (prev, cur jet.PrefixTree, found bool) // FinishGenesis must be called after genesis procedure is finished with (depth) is a depth of // jet tree to be used for normal operations (like multi-split) and (lastGenesisPulse) is the pulse // when genesis was yet active. FinishGenesis(depth uint8, lastGenesisPulse pulse.Number) // IsGenesisFinished returns true after FinishGenesis is called even without a pulse change. IsGenesisFinished() bool // TryLockGenesis marks genesis as started. This prevents multiple genesis initializations in different pulses. TryLockGenesis(pulse.Number) bool // GenesisPulse returns pulse set by either TryLockGenesis or by FinishGenesis GenesisPulse() pulse.Number // SplitNext registers a split operation to be applied at next pulse. // Only one split or merge operation can be applied to a jet per pulse. SplitNext(jet.DropID) }
Click to show internal directories.
Click to hide internal directories.