Documentation ¶
Index ¶
- Constants
- Variables
- type MemberStatus
- type SubNet
- func (self *SubNet) GetMaskAddrFilter() p2p.AddressFilter
- func (self *SubNet) GetMembersInfo() []common.SubnetMemberInfo
- func (self *SubNet) GetReservedAddrFilter(staticFilterEnabled bool) p2p.AddressFilter
- func (self *SubNet) IpInMembers(ip string) bool
- func (self *SubNet) IsSeedNode() bool
- func (self *SubNet) OnAddPeer(net p2p.P2P, info *peer.PeerInfo)
- func (self *SubNet) OnDelPeer(info *peer.PeerInfo)
- func (self *SubNet) OnHostAddrDetected(listenAddr string)
- func (self *SubNet) OnMembersRequest(ctx *p2p.Context, msg *types.SubnetMembersRequest)
- func (self *SubNet) OnMembersResponse(ctx *p2p.Context, msg *types.SubnetMembers)
- func (self *SubNet) Start(net p2p.P2P)
- func (self *SubNet) Stop()
- type SubNetMaskAddrFilter
- type SubNetReservedAddrFilter
Constants ¶
View Source
const MIN_VERSION_FOR_SUBNET = "2.0.0-0"
View Source
const MaxInactiveTime = 10 * time.Minute
View Source
const MaxMemberRequests = 3
Variables ¶
View Source
var RefreshDuration = 1 * time.Minute
Functions ¶
This section is empty.
Types ¶
type MemberStatus ¶
type SubNet ¶
type SubNet struct {
// contains filtered or unexported fields
}
func NewSubNet ¶
func NewSubNet(acc *account.Account, seeds *utils.HostsResolver, gov utils.GovNodeResolver, logger common.Logger) *SubNet
func (*SubNet) GetMaskAddrFilter ¶
func (self *SubNet) GetMaskAddrFilter() p2p.AddressFilter
func (*SubNet) GetMembersInfo ¶
func (self *SubNet) GetMembersInfo() []common.SubnetMemberInfo
restful api
func (*SubNet) GetReservedAddrFilter ¶
func (self *SubNet) GetReservedAddrFilter(staticFilterEnabled bool) p2p.AddressFilter
func (*SubNet) IpInMembers ¶
func (*SubNet) IsSeedNode ¶
func (*SubNet) OnHostAddrDetected ¶
func (*SubNet) OnMembersRequest ¶
func (self *SubNet) OnMembersRequest(ctx *p2p.Context, msg *types.SubnetMembersRequest)
func (*SubNet) OnMembersResponse ¶
func (self *SubNet) OnMembersResponse(ctx *p2p.Context, msg *types.SubnetMembers)
type SubNetMaskAddrFilter ¶
type SubNetMaskAddrFilter struct {
// contains filtered or unexported fields
}
func (*SubNetMaskAddrFilter) Contains ¶
func (self *SubNetMaskAddrFilter) Contains(addr string) bool
type SubNetReservedAddrFilter ¶
type SubNetReservedAddrFilter struct {
// contains filtered or unexported fields
}
func (*SubNetReservedAddrFilter) Contains ¶
func (self *SubNetReservedAddrFilter) Contains(addr string) bool
Click to show internal directories.
Click to hide internal directories.