netevents

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialContextFunc

func DialContextFunc(logger *events.Logger, 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 opening and closing events that occur on the connections returned by the function.

The logger may be nil, in that case the default logger is used to report the connection events.

func DialFunc

func DialFunc(logger *events.Logger, dial func(string, string) (net.Conn, error)) func(string, string) (net.Conn, error)

DialFunc returns a wrapper for dial which logs opening and closing events that occur on the connections returned by the function.

The logger may be nil, in that case the default logger is used to report the connection events.

func NewHandler

func NewHandler(logger *events.Logger, handler netx.Handler) netx.Handler

NewHandler returns a wrapper for handler which logs opening and closing events that occur on the connections served by the handler with logger.

The logger may be nil, in that case the default logger is used to report the connection events.

Types

This section is empty.

Jump to

Keyboard shortcuts

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