util

package
v0.0.0-...-1c66c14 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StripDomain

func StripDomain(hostname, domain string) (string, bool)

func WriteFull

func WriteFull(w io.Writer, p []byte) error

Types

type Canceller

type Canceller struct {
	// contains filtered or unexported fields
}

func NewCanceller

func NewCanceller() *Canceller

func (*Canceller) Cancel

func (c *Canceller) Cancel(ctx context.Context)

func (*Canceller) CancelAll

func (c *Canceller) CancelAll()

func (*Canceller) CollectMetrics

func (c *Canceller) CollectMetrics(w *bufio.Writer)

func (*Canceller) WithTimeout

func (c *Canceller) WithTimeout(timeout time.Duration) context.Context

type MeteredConn

type MeteredConn struct {
	net.Conn
	// contains filtered or unexported fields
}

func Meter

func Meter(conn net.Conn) *MeteredConn

func (*MeteredConn) Count

func (c *MeteredConn) Count() (read uint64, written uint64)

func (*MeteredConn) Read

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

func (*MeteredConn) Write

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

Jump to

Keyboard shortcuts

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