util

package
v0.0.0-...-d9bf8a9 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvDefault

func GetEnvDefault(key string, defaultVal string) string

func StatsDGauge

func StatsDGauge(label string, value int64)

func StatsDTiming

func StatsDTiming(label string, start, end time.Time)

Types

type ProxyTCP

type ProxyTCP struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ProxyTCP is a basic TCP proxy which can terminate connections. It can be used to test reconnect behaviour.

func NewProxyTCP

func NewProxyTCP(lAddr, rAddr string) (*ProxyTCP, error)

func (*ProxyTCP) AcceptLoop

func (p *ProxyTCP) AcceptLoop()

func (*ProxyTCP) Addr

func (p *ProxyTCP) Addr() string

func (*ProxyTCP) Close

func (p *ProxyTCP) Close()

func (*ProxyTCP) Connections

func (p *ProxyTCP) Connections() []net.Conn

func (*ProxyTCP) KillConnected

func (p *ProxyTCP) KillConnected()

Jump to

Keyboard shortcuts

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