Documentation ¶
Index ¶
- Constants
- type Config
- type ConnProvider
- type PeerGlobalPool
- func (p *PeerGlobalPool) AddCtrl(peerId string, addCtrl connCtrl)
- func (p *PeerGlobalPool) GetPeer(id string) (peer.Peer, error)
- func (p *PeerGlobalPool) GetPeerIds() (peerIds []string)
- func (p *PeerGlobalPool) Init(a *app.App) (err error)
- func (p *PeerGlobalPool) MakePeers()
- func (p *PeerGlobalPool) Name() (name string)
- type PeerProvider
- func (c *PeerProvider) Close(ctx context.Context) (err error)
- func (c *PeerProvider) Dial(ctx context.Context, peerId string) (pr peer.Peer, err error)
- func (c *PeerProvider) GetPeer(peerId string) (pr peer.Peer, err error)
- func (c *PeerProvider) GetPeerIds() (peerIds []string)
- func (c *PeerProvider) Init(a *app.App) (err error)
- func (c *PeerProvider) Name() (name string)
- func (c *PeerProvider) Run(ctx context.Context) (err error)
- type SyncApp
- type TestPeerManager
- func (c *TestPeerManager) BroadcastMessage(ctx context.Context, msg drpc.Message) error
- func (c *TestPeerManager) GetNodePeers(ctx context.Context) (peers []peer.Peer, err error)
- func (c *TestPeerManager) GetResponsiblePeers(ctx context.Context) (peers []peer.Peer, err error)
- func (c *TestPeerManager) Init(a *app.App) (err error)
- func (c *TestPeerManager) Name() (name string)
- func (c *TestPeerManager) SendMessage(ctx context.Context, peerId string, msg drpc.Message) error
Constants ¶
View Source
const PeerGlobalName = "peerglobalpool"
View Source
const PeerName = "net.peerservice"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { }
func (*Config) GetStreamConfig ¶
func (c *Config) GetStreamConfig() streampool.StreamConfig
type ConnProvider ¶
func NewConnProvider ¶
func NewConnProvider() *ConnProvider
type PeerGlobalPool ¶
func NewPeerGlobalPool ¶
func NewPeerGlobalPool(peerIds []string) *PeerGlobalPool
func (*PeerGlobalPool) AddCtrl ¶
func (p *PeerGlobalPool) AddCtrl(peerId string, addCtrl connCtrl)
func (*PeerGlobalPool) GetPeerIds ¶
func (p *PeerGlobalPool) GetPeerIds() (peerIds []string)
func (*PeerGlobalPool) MakePeers ¶
func (p *PeerGlobalPool) MakePeers()
func (*PeerGlobalPool) Name ¶
func (p *PeerGlobalPool) Name() (name string)
type PeerProvider ¶
func NewPeerProvider ¶
func NewPeerProvider(myPeer string) *PeerProvider
func (*PeerProvider) GetPeer ¶
func (c *PeerProvider) GetPeer(peerId string) (pr peer.Peer, err error)
func (*PeerProvider) GetPeerIds ¶
func (c *PeerProvider) GetPeerIds() (peerIds []string)
func (*PeerProvider) Name ¶
func (c *PeerProvider) Name() (name string)
type TestPeerManager ¶
type TestPeerManager struct {
// contains filtered or unexported fields
}
func NewTestPeerManager ¶
func NewTestPeerManager() *TestPeerManager
func (*TestPeerManager) BroadcastMessage ¶
func (*TestPeerManager) GetNodePeers ¶
func (*TestPeerManager) GetResponsiblePeers ¶
func (*TestPeerManager) Name ¶
func (c *TestPeerManager) Name() (name string)
func (*TestPeerManager) SendMessage ¶
Click to show internal directories.
Click to hide internal directories.