subnet

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2020 License: LGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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 MemberStatus struct {
	PubKey string
	Alive  time.Time
}

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 (self *SubNet) IpInMembers(ip string) bool

func (*SubNet) IsSeedNode

func (self *SubNet) IsSeedNode() bool

func (*SubNet) OnAddPeer

func (self *SubNet) OnAddPeer(net p2p.P2P, info *peer.PeerInfo)

func (*SubNet) OnDelPeer

func (self *SubNet) OnDelPeer(info *peer.PeerInfo)

func (*SubNet) OnHostAddrDetected

func (self *SubNet) OnHostAddrDetected(listenAddr string)

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)

func (*SubNet) Start

func (self *SubNet) Start(net p2p.P2P)

func (*SubNet) Stop

func (self *SubNet) Stop()

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL