Documentation ¶
Index ¶
- Variables
- func JSONMarshal[O []byte | string](t testing.TB, a any) O
- func ListenerModName() string
- func NopConn() net.Conn
- type TestListener
- func (e *TestListener) Accept() (net.Conn, error)
- func (e *TestListener) AcceptConn(c net.Conn)
- func (e *TestListener) Addr() net.Addr
- func (e *TestListener) CaddyModule() caddy.ModuleInfo
- func (e *TestListener) Cleanup() error
- func (e *TestListener) Close() error
- func (e *TestListener) FailCleanup(msg string)
- func (e *TestListener) FailProvision(msg string)
- func (e *TestListener) FailUnmarshalCaddyfile(msg string)
- func (e *TestListener) GetReal() *TestListener
- func (e *TestListener) Provision(caddy.Context) error
- func (e *TestListener) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
Constants ¶
This section is empty.
Variables ¶
View Source
var TestListeners = map[uuid.UUID]*TestListener{}
Functions ¶
func ListenerModName ¶
func ListenerModName() string
Types ¶
type TestListener ¶
type TestListener struct { Called struct { Provision bool Cleanup bool Close bool Accept bool Addr bool UnmarshalCaddyfile bool } `json:"-"` ID uuid.UUID `json:"id"` // contains filtered or unexported fields }
func NewTestListener ¶
func NewTestListener(t testing.TB, ctx context.Context) (*TestListener, func())
func NewTestListeners ¶
func (*TestListener) AcceptConn ¶
func (e *TestListener) AcceptConn(c net.Conn)
func (*TestListener) Addr ¶
func (e *TestListener) Addr() net.Addr
func (*TestListener) CaddyModule ¶
func (e *TestListener) CaddyModule() caddy.ModuleInfo
func (*TestListener) Cleanup ¶
func (e *TestListener) Cleanup() error
func (*TestListener) Close ¶
func (e *TestListener) Close() error
func (*TestListener) FailCleanup ¶
func (e *TestListener) FailCleanup(msg string)
func (*TestListener) FailProvision ¶
func (e *TestListener) FailProvision(msg string)
func (*TestListener) FailUnmarshalCaddyfile ¶
func (e *TestListener) FailUnmarshalCaddyfile(msg string)
func (*TestListener) GetReal ¶
func (e *TestListener) GetReal() *TestListener
func (*TestListener) Provision ¶
func (e *TestListener) Provision(caddy.Context) error
func (*TestListener) UnmarshalCaddyfile ¶
func (e *TestListener) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
Click to show internal directories.
Click to hide internal directories.