proxyutils

package
v0.0.0-...-b3878fe Latest Latest
Warning

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

Go to latest
Published: May 17, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disconnect

func Disconnect(t *testing.T, proxyName string, duration time.Duration) (started, stopped func())

func DisconnectWithStartStartedStopped

func DisconnectWithStartStartedStopped(t *testing.T, proxyName string, duration time.Duration) (disconnect, awaitStarted, awaitStopped func())

block current thread timeout: how long the asynchronous goroutine needs to wait until it disables the connection duration: how long the asynchronous goroutine wait suntil it reenables the connection

func DisconnectWithStartedStopped

func DisconnectWithStartedStopped(t *testing.T, proxyName string, block, startIn, duration time.Duration) (awaitStarted, awaitStopped func())

https://github.com/Shopify/toxiproxy#toxics block current thread timeout: how long the asynchronous goroutine needs to wait until it disables the connection duration: how long the asynchronous goroutine wait suntil it reenables the connection

func DisconnectWithStopped

func DisconnectWithStopped(t *testing.T, proxyName string, block, timeout, duration time.Duration) (wait func())

https://github.com/Shopify/toxiproxy#toxics block current thread timeout: how long the asynchronous goroutine needs to wait until it disables the connection duration: how long the asynchronous goroutine wait suntil it reenables the connection

Types

type Proxy

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

func NewProxy

func NewProxy(t *testing.T, proxyName string) *Proxy

func (*Proxy) Close

func (p *Proxy) Close() error

func (*Proxy) Disable

func (p *Proxy) Disable() error

func (*Proxy) Enable

func (p *Proxy) Enable() error

Jump to

Keyboard shortcuts

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