Documentation ¶
Index ¶
Constants ¶
View Source
const (
SLOTS_NUM = 1 << 14
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct { ID string `json:"id"` Slots SlotsRange `json:"slots"` }
type SlotsManager ¶
type SlotsManager struct {
// contains filtered or unexported fields
}
func InitSlotManager ¶
func InitSlotManager(startNodes []Node) *SlotsManager
func RestoreSlotsManager ¶
func RestoreSlotsManager(nds []Node) (*SlotsManager, error)
func (*SlotsManager) Check ¶
func (sm *SlotsManager) Check()
func (*SlotsManager) NodeBySlot ¶
func (sm *SlotsManager) NodeBySlot(n uint16) (*Node, error)
func (*SlotsManager) Nodes ¶
func (sm *SlotsManager) Nodes() []Node
type SlotsRange ¶
Click to show internal directories.
Click to hide internal directories.