synctest

package
v0.5.17 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 NewConfig

func NewConfig() *Config

func (*Config) GetStreamConfig

func (c *Config) GetStreamConfig() streampool.StreamConfig

func (*Config) Init

func (c *Config) Init(a *app.App) (err error)

func (*Config) Name

func (c *Config) Name() (name string)

type ConnProvider

type ConnProvider struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewConnProvider

func NewConnProvider() *ConnProvider

func (*ConnProvider) GetConn

func (c *ConnProvider) GetConn(firstId, secondId string) (conn transport.MultiConn)

type PeerGlobalPool

type PeerGlobalPool struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewPeerGlobalPool

func NewPeerGlobalPool(peerIds []string) *PeerGlobalPool

func (*PeerGlobalPool) AddCtrl

func (p *PeerGlobalPool) AddCtrl(peerId string, addCtrl connCtrl)

func (*PeerGlobalPool) GetPeer

func (p *PeerGlobalPool) GetPeer(id string) (peer.Peer, error)

func (*PeerGlobalPool) GetPeerIds

func (p *PeerGlobalPool) GetPeerIds() (peerIds []string)

func (*PeerGlobalPool) Init

func (p *PeerGlobalPool) Init(a *app.App) (err error)

func (*PeerGlobalPool) MakePeers

func (p *PeerGlobalPool) MakePeers()

func (*PeerGlobalPool) Name

func (p *PeerGlobalPool) Name() (name string)

type PeerProvider

type PeerProvider struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewPeerProvider

func NewPeerProvider(myPeer string) *PeerProvider

func (*PeerProvider) Close

func (c *PeerProvider) Close(ctx context.Context) (err error)

func (*PeerProvider) Dial

func (c *PeerProvider) Dial(ctx context.Context, peerId string) (pr peer.Peer, err error)

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) Init

func (c *PeerProvider) Init(a *app.App) (err error)

func (*PeerProvider) Name

func (c *PeerProvider) Name() (name string)

func (*PeerProvider) Run

func (c *PeerProvider) Run(ctx context.Context) (err error)

type SyncApp

type SyncApp struct {
	// contains filtered or unexported fields
}

type TestPeerManager

type TestPeerManager struct {
	// contains filtered or unexported fields
}

func NewTestPeerManager

func NewTestPeerManager() *TestPeerManager

func (*TestPeerManager) BroadcastMessage

func (c *TestPeerManager) BroadcastMessage(ctx context.Context, msg drpc.Message) error

func (*TestPeerManager) GetNodePeers

func (c *TestPeerManager) GetNodePeers(ctx context.Context) (peers []peer.Peer, err error)

func (*TestPeerManager) GetResponsiblePeers

func (c *TestPeerManager) GetResponsiblePeers(ctx context.Context) (peers []peer.Peer, err error)

func (*TestPeerManager) Init

func (c *TestPeerManager) Init(a *app.App) (err error)

func (*TestPeerManager) Name

func (c *TestPeerManager) Name() (name string)

func (*TestPeerManager) SendMessage

func (c *TestPeerManager) SendMessage(ctx context.Context, peerId string, msg drpc.Message) error

Jump to

Keyboard shortcuts

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