Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Net should be tcp4 or tcp6. Net string `json:"net"` // AddrStr is the local address string. AddrStr string `json:"address"` // Peers is peer list. Peers []string `json:"-"` // LocalTCPAddr is TCP address parsed from // Net and AddrStr. LocalTCPAddr *net.TCPAddr `json:"-"` // AViewMinSize is the minimum size of the active view. AViewMinSize int `json:"active_view_min"` // AViewMaxSize is the maximum size of the active view. AViewMaxSize int `json:"active_view_max"` // PViewSize is the size of the passive view. PViewSize int `json:"passive_view"` // Ka is the number of nodes to choose from active view // when shuffling views. Ka int `json:"ka"` // Kp is the number of nodes to choose from passive view // when shuffling views. Kp int `json:"kb"` // Active Random Walk Length. ARWL int `json:"arwl"` // Passive Random Walk Length. PRWL int `json:"prwl"` // Shuffle Random Walk Length. SRWL int `json:"srwl"` // Message life. MLife int `json:"message_life"` // Shuffle Duration in seconds. ShuffleDuration int `json:"shuffle_duration"` // Heal Duration in seconds. HealDuration int `json:"heal_duration"` // The REST server address. RESTAddrStr string `json:"rest_addr"` // The path to user message handler(script). UserMsgHandler string `json:"user_message_handler"` // The duration to purge message buffer. PurgeDuration int `json:"purge_duration"` }
Config describes the config of the system.
func ParseConfig ¶
func (*Config) ShufflePeers ¶
Click to show internal directories.
Click to hide internal directories.