Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Membership ¶
type Membership interface {
Join(Ip []string) (num int, err error)
Leave()
Listen(ctx context.Context, outch chan P2PEvent)
Lookup(id []byte) (addr string)
NumOfPeers() int
IsAlive() bool
MembersIP() (addr []net.IP)
MembersID() (list [][]byte)
}
Membership represents the p2p network
func NewSerfNet ¶
func NewSerfNet(Addr net.IP, id, port string) (Membership, error)
NewSerfNet creates a Serf implementation
func NewSimulator ¶
func NewSimulator() (Membership, error)
NewSerfNet creates a Serf implementation
Click to show internal directories.
Click to hide internal directories.