Documentation ¶
Index ¶
- func MultiConnPair(peerIdServ, peerIdClient string) (serv, client transport.MultiConn)
- type TestPool
- func (t *TestPool) AddPeer(ctx context.Context, p peer.Peer) (err error)
- func (t *TestPool) Close(ctx context.Context) (err error)
- func (t *TestPool) Get(ctx context.Context, id string) (peer.Peer, error)
- func (t *TestPool) GetOneOf(ctx context.Context, peerIds []string) (peer.Peer, error)
- func (t *TestPool) Init(a *app.App) (err error)
- func (t *TestPool) Name() (name string)
- func (t *TestPool) Run(ctx context.Context) (err error)
- func (t *TestPool) WithServer(ts *TestServer) *TestPool
- type TestServer
- func (s *TestServer) Close(ctx context.Context) (err error)
- func (s *TestServer) Dial(peerId string) (clientPeer peer.Peer, err error)
- func (s *TestServer) DrpcConfig() rpc.Config
- func (s *TestServer) Init(a *app.App) (err error)
- func (s *TestServer) Name() (name string)
- func (s *TestServer) Run(ctx context.Context) (err error)
- func (s *TestServer) ServeConn(ctx context.Context, conn net.Conn) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MultiConnPair ¶ added in v0.2.0
Types ¶
type TestPool ¶
type TestPool struct {
// contains filtered or unexported fields
}
func NewTestPool ¶
func NewTestPool() *TestPool
func (*TestPool) WithServer ¶
func (t *TestPool) WithServer(ts *TestServer) *TestPool
type TestServer ¶ added in v0.2.0
type TestServer struct { *drpcmux.Mux *drpcserver.Server }
func NewTestServer ¶
func NewTestServer() *TestServer
func (*TestServer) Close ¶ added in v0.2.0
func (s *TestServer) Close(ctx context.Context) (err error)
func (*TestServer) Dial ¶ added in v0.2.0
func (s *TestServer) Dial(peerId string) (clientPeer peer.Peer, err error)
func (*TestServer) DrpcConfig ¶ added in v0.2.0
func (s *TestServer) DrpcConfig() rpc.Config
func (*TestServer) Name ¶ added in v0.2.0
func (s *TestServer) Name() (name string)
Click to show internal directories.
Click to hide internal directories.