rpctest

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCantConnect = errors.New("can't connect to test server")

Functions

This section is empty.

Types

type TesServer

type TesServer struct {
	*drpcmux.Mux
	*drpcserver.Server
}

func NewTestServer

func NewTestServer() *TesServer

func (*TesServer) Close

func (ts *TesServer) Close(ctx context.Context) (err error)

func (*TesServer) Dial

func (ts *TesServer) Dial(ctx context.Context) drpc.Conn

func (*TesServer) Init

func (ts *TesServer) Init(a *app.App) (err error)

func (*TesServer) Name

func (ts *TesServer) Name() (name string)

func (*TesServer) Run

func (ts *TesServer) Run(ctx context.Context) (err error)

type TestPool

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

func NewTestPool

func NewTestPool() *TestPool

func (*TestPool) AddPeer

func (t *TestPool) AddPeer(p peer.Peer)

func (*TestPool) Close

func (t *TestPool) Close(ctx context.Context) (err error)

func (*TestPool) Dial

func (t *TestPool) Dial(ctx context.Context, id string) (peer.Peer, error)

func (*TestPool) DialOneOf

func (t *TestPool) DialOneOf(ctx context.Context, peerIds []string) (peer.Peer, error)

func (*TestPool) Get

func (t *TestPool) Get(ctx context.Context, id string) (peer.Peer, error)

func (*TestPool) GetOneOf

func (t *TestPool) GetOneOf(ctx context.Context, peerIds []string) (peer.Peer, error)

func (*TestPool) Init

func (t *TestPool) Init(a *app.App) (err error)

func (*TestPool) Name

func (t *TestPool) Name() (name string)

func (*TestPool) NewPool

func (t *TestPool) NewPool(name string) pool.Pool

func (*TestPool) Run

func (t *TestPool) Run(ctx context.Context) (err error)

func (*TestPool) WithServer

func (t *TestPool) WithServer(ts *TesServer) *TestPool

Jump to

Keyboard shortcuts

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