net

package
v0.0.0-...-b94c5f0 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2017 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(network, addr string) (net.Conn, error)

Dial wraps net.Dial with DNS lookup cache and Prometheus metrics.

func FlushDNSCache

func FlushDNSCache()

FlushDNSCache flushes DNS cache used by Dial.

Types

type Conn

type Conn struct {
	net.Conn
}

Conn wraps net.Conn with Prometheus metrics.

func (*Conn) Close

func (c *Conn) Close() (err error)

Close closes the connection. Any blocked Read or Write operations will be unblocked and return errors.

func (*Conn) Read

func (c *Conn) Read(b []byte) (n int, err error)

Read reads data from the connection. Read can be made to time out and return a Error with Timeout() == true after a fixed time limit; see SetDeadline and SetReadDeadline.

func (*Conn) Write

func (c *Conn) Write(b []byte) (n int, err error)

Write writes data to the connection. Write can be made to time out and return a Error with Timeout() == true after a fixed time limit; see SetDeadline and SetWriteDeadline.

Jump to

Keyboard shortcuts

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