Documentation ¶
Index ¶
- func DialContextFunc(dial func(context.Context, string, string) (net.Conn, error)) func(context.Context, string, string) (net.Conn, error)
- func DialContextFuncWith(logger *events.Logger, ...) func(context.Context, string, string) (net.Conn, error)
- func DialFunc(dial func(string, string) (net.Conn, error)) func(string, string) (net.Conn, error)
- func DialFuncWith(logger *events.Logger, dial func(string, string) (net.Conn, error)) func(string, string) (net.Conn, error)
- func NewListener(listener net.Listener) net.Listener
- func NewListenerWith(logger *events.Logger, listener net.Listener) net.Listener
- type Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialContextFunc ¶
func DialContextFunc(dial func(context.Context, string, string) (net.Conn, error)) func(context.Context, string, string) (net.Conn, error)
DialContextFunc returns a wrapper for dial which logs with the default logger all opening and closing events that occur on the connections returned by the dial function.
func DialContextFuncWith ¶
func DialContextFuncWith(logger *events.Logger, dial func(context.Context, string, string) (net.Conn, error)) func(context.Context, string, string) (net.Conn, error)
DialContextFuncWith returns a wrapper for dial which logs with logger all opening and closing events that occur on the connections returned by the dial function.
func DialFunc ¶
DialFunc returns a wrapper for dial which logs with the default logger all opening and closing events that occur on the connections returned by the dial function.
func DialFuncWith ¶
func DialFuncWith(logger *events.Logger, dial func(string, string) (net.Conn, error)) func(string, string) (net.Conn, error)
DialFuncWith returns a wrapper for dial which logs with logger all opening and closing events that occur on the connections returned by the dial function.
func NewListener ¶
NewListener returns a wrapped version of listener which logs with the default logger all accept and close events that occur on the listener.
Types ¶
type Handler ¶
Handler is an interface that can be implemented by types that serve network connections.
func NewHandler ¶
NewHandler returns a wrapped handler which logs with the default logger all opening and closing events that occur on the connections servied by the handler.