netutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MPL-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindFreePort

func FindFreePort() (int, error)

func GetReq

func GetReq(c *http.Client, url url.URL) (statusCode int, responseBody io.Reader, err error)

func PostReq

func PostReq(c *http.Client, url url.URL, contentType string, body []byte) (
	statusCode int,
	responseBody io.Reader,
	err error,
)

Types

type WSReaderClient

type WSReaderClient struct {
	Buffer     []byte
	LineBuffer [][]byte
	Saved      chan util.Signal
	// contains filtered or unexported fields
}

func NewTestWSReaderClient

func NewTestWSReaderClient(t testing.TB) *WSReaderClient

func NewWSReaderClient

func NewWSReaderClient() *WSReaderClient

func (*WSReaderClient) Close

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

func (*WSReaderClient) Connect

func (c *WSReaderClient) Connect(url url.URL) (err error)

Jump to

Keyboard shortcuts

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