netstats

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConn

func NewConn(c net.Conn) net.Conn

NewConn returns a net.Conn object that wraps c and produces metrics on the default engine.

func NewConnWith

func NewConnWith(eng *stats.Engine, c net.Conn) net.Conn

NewConn returns a net.Conn object that wraps c and produces metrics on eng.

func NewListener

func NewListener(lstn net.Listener) net.Listener

func NewListenerWith

func NewListenerWith(eng *stats.Engine, lstn net.Listener) net.Listener

Types

type Handler

type Handler interface {
	ServeConn(ctx context.Context, conn net.Conn)
}

Handler is an interface that can be implemented by types that serve network connections.

func NewHandler

func NewHandler(hdl Handler) Handler

NewHandler returns a Handler object that warps hdl and produces metrics on the default engine.

func NewHandlerWith

func NewHandlerWith(eng *stats.Engine, hdl Handler) Handler

NewHandlerWith returns a Handler object that warps hdl and produces metrics on eng.

Jump to

Keyboard shortcuts

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