util

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTCPAndUDPPort

func GetTCPAndUDPPort() (string, error)

func GetTCPPort

func GetTCPPort() (string, error)

func IsHttp4xxError

func IsHttp4xxError(resp *http.Response) bool

func NewFinishableReader

func NewFinishableReader(r io.Reader, finishCh <-chan struct{}) io.Reader

func NewRateLimitReader

func NewRateLimitReader(r io.Reader, bytePerSec int) io.Reader

Types

type FinishableReader

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

func (*FinishableReader) Read

func (r *FinishableReader) Read(p []byte) (int, error)

type PortPool added in v0.9.0

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

func NewPortPool added in v0.9.0

func NewPortPool() *PortPool

func (*PortPool) GetAndReserve added in v0.9.0

func (p *PortPool) GetAndReserve() (string, error)

func (*PortPool) Release added in v0.9.0

func (p *PortPool) Release(port string)

type RateLimitReader

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

func (*RateLimitReader) Read

func (r *RateLimitReader) Read(p []byte) (int, error)

Jump to

Keyboard shortcuts

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