grasp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPathIgnore

func AppendPathIgnore(path string) error

func MatchIgnore

func MatchIgnore(refl *Reflection) bool

func Ponder

func Ponder(refl *Reflection)

func ReopenLogger added in v0.3.0

func ReopenLogger(w io.Writer)

func StartReflector

func StartReflector(addr, remote string, reflections chan<- *Reflection) error

Types

type Reflection

type Reflection struct {
	URL     *url.URL
	Method  string
	Request string

	StatusCode int
	Nbytes     int64
	// contains filtered or unexported fields
}

func (*Reflection) ReflectRequest

func (refl *Reflection) ReflectRequest(req *http.Request, remote *url.URL) (*http.Request, error)

func (*Reflection) ReflectResponse

func (refl *Reflection) ReflectResponse(resp *http.Response, w http.ResponseWriter) error

func (*Reflection) Response

func (refl *Reflection) Response() io.ReadCloser

func (*Reflection) String

func (refl *Reflection) String() string

Jump to

Keyboard shortcuts

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