Versions in this module Expand all Collapse all v1 v1.0.2 Jan 27, 2022 v1.0.1 Dec 1, 2021 Changes in this version + func Drivers() []string + func Register(name string, f NewP2PServFunc) + type Network interface + Context func() *nctx.NetCtx + NewSubscriber func(pb.XuperMessage_MessageType, interface{}, ...p2p.SubscriberOption) p2p.Subscriber + PeerInfo func() pb.PeerInfo + Register func(p2p.Subscriber) error + SendMessage func(xctx.XContext, *pb.XuperMessage, ...p2p.OptionFunc) error + SendMessageWithResponse func(xctx.XContext, *pb.XuperMessage, ...p2p.OptionFunc) ([]*pb.XuperMessage, error) + Start func() + Stop func() + UnRegister func(p2p.Subscriber) error + func NewNetwork(ctx *nctx.NetCtx) (Network, error) + type NetworkImpl struct + func (t *NetworkImpl) Context() *nctx.NetCtx + func (t *NetworkImpl) NewSubscriber(typ pb.XuperMessage_MessageType, v interface{}, opts ...p2p.SubscriberOption) p2p.Subscriber + func (t *NetworkImpl) PeerInfo() pb.PeerInfo + func (t *NetworkImpl) Register(sub p2p.Subscriber) error + func (t *NetworkImpl) SendMessage(ctx xctx.XContext, msg *pb.XuperMessage, opts ...p2p.OptionFunc) error + func (t *NetworkImpl) SendMessageWithResponse(ctx xctx.XContext, msg *pb.XuperMessage, opts ...p2p.OptionFunc) ([]*pb.XuperMessage, error) + func (t *NetworkImpl) Start() + func (t *NetworkImpl) Stop() + func (t *NetworkImpl) UnRegister(sub p2p.Subscriber) error + type NewP2PServFunc func() p2p.Server