http

package
v0.0.0-...-e36e541 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AM_REQ = 1
View Source
const AM_RESP = 2

Variables

This section is empty.

Functions

func StartServer

func StartServer(addr string, handler http.Handler) (serve func() error, err error)

Types

type Client

type Client struct {
	http.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(addr string) (*Client, error)

func (*Client) Close

func (a *Client) Close()

func (*Client) Init

func (c *Client) Init()

func (*Client) RoundTrip

func (a *Client) RoundTrip(req *http.Request) (*http.Response, error)

type Server

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

func NewServer

func NewServer(addr string, handler http.Handler) (*Server, error)

func (*Server) Close

func (s *Server) Close()

func (*Server) Init

func (c *Server) Init()

func (*Server) Serve

func (s *Server) Serve()

Jump to

Keyboard shortcuts

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