Documentation
¶
Index ¶
- func NewCaddyContext(t testing.TB, base context.Context, cfg caddy.Config) (caddy.Context, context.CancelFunc)
- type TestConn
- func (tc *TestConn) Close() error
- func (tc *TestConn) LocalAddr() net.Addr
- func (tc *TestConn) Read(b []byte) (int, error)
- func (tc *TestConn) RemoteAddr() net.Addr
- func (tc *TestConn) SetDeadline(t time.Time) error
- func (tc *TestConn) SetReadDeadline(t time.Time) error
- func (tc *TestConn) SetWriteDeadline(t time.Time) error
- func (tc *TestConn) Write(b []byte) (int, error)
- type TestDialer
- type TestListener
- type TestNet
- type TestNetLookup
- type TestNetOp
- type TestNetwork
- func (t *TestNetwork) CaddyModule() caddy.ModuleInfo
- func (t *TestNetwork) ID() caddy.ModuleID
- func (t *TestNetwork) Id() string
- func (t *TestNetwork) Start(fn pointc.RegisterFunc) error
- func (t *TestNetwork) Stop() error
- func (t *TestNetwork) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
- func (t *TestNetwork) UnmarshalJSON(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TestConn ¶
type TestConn struct {
T testing.TB
ReadFn func([]byte) (int, error)
WriteFn func([]byte) (int, error)
CloseFn func() error
LocalAddrFn func() net.Addr
RemoteAddrFn func() net.Addr
SetDeadlineFn func(time.Time) error
SetReadDeadlineFn func(time.Time) error
SetWriteDeadlineFn func(time.Time) error
}
func NewTestConn ¶
func (*TestConn) RemoteAddr ¶
type TestDialer ¶
type TestDialer struct {
T testing.TB
DialFn func(context.Context, *net.TCPAddr) (net.Conn, error)
DialPacketFn func(*net.UDPAddr) (net.PacketConn, error)
}
func NewTestDialer ¶
func NewTestDialer(t testing.TB) *TestDialer
func (*TestDialer) DialPacket ¶
func (td *TestDialer) DialPacket(addr *net.UDPAddr) (net.PacketConn, error)
type TestListener ¶
type TestListener struct {
T testing.TB
AcceptFn func() (net.Conn, error)
CloseFn func() error
AddrFn func() net.Addr
}
func NewTestListener ¶
func NewTestListener(t testing.TB) *TestListener
func (*TestListener) Addr ¶
func (tl *TestListener) Addr() net.Addr
func (*TestListener) Close ¶
func (tl *TestListener) Close() error
type TestNet ¶
type TestNet struct {
T testing.TB
ListenFn func(*net.TCPAddr) (net.Listener, error)
ListenPacketFn func(*net.UDPAddr) (net.PacketConn, error)
DialerFn func(net.IP, uint16) pointc.Dialer
LocalAddrFn func() net.IP
}
func NewTestNet ¶
func (*TestNet) ListenPacket ¶
type TestNetLookup ¶
func NewTestNetLookup ¶
func NewTestNetLookup(t testing.TB) *TestNetLookup
type TestNetOp ¶
type TestNetOp struct {
StartFn func(pointc.NetLookup) error `json:"-"`
StopFn func() error `json:"-"`
UnmarshalCaddyfileFn func(*caddyfile.Dispenser) error `json:"-"`
UnmarshalJSONFn func(b []byte) error `json:"-"`
// contains filtered or unexported fields
}
func NewTestNetOp ¶
func (*TestNetOp) CaddyModule ¶
func (t *TestNetOp) CaddyModule() caddy.ModuleInfo
func (*TestNetOp) UnmarshalCaddyfile ¶
func (*TestNetOp) UnmarshalJSON ¶
type TestNetwork ¶
type TestNetwork struct {
UnmarshalCaddyfileFn func(*caddyfile.Dispenser) error `json:"-"`
UnmarshalJSONFn func([]byte) error `json:"-"`
StartFn func(pointc.RegisterFunc) error `json:"-"`
StopFn func() error `json:"-"`
// contains filtered or unexported fields
}
func NewTestNetwork ¶
func NewTestNetwork(t testing.TB) *TestNetwork
func (*TestNetwork) CaddyModule ¶
func (t *TestNetwork) CaddyModule() caddy.ModuleInfo
func (*TestNetwork) ID ¶
func (t *TestNetwork) ID() caddy.ModuleID
func (*TestNetwork) Id ¶
func (t *TestNetwork) Id() string
func (*TestNetwork) Start ¶
func (t *TestNetwork) Start(fn pointc.RegisterFunc) error
func (*TestNetwork) Stop ¶
func (t *TestNetwork) Stop() error
func (*TestNetwork) UnmarshalCaddyfile ¶
func (t *TestNetwork) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
func (*TestNetwork) UnmarshalJSON ¶
func (t *TestNetwork) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.