interceptor

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterceptionResponse

type InterceptionResponse struct {
	Req  *http.Request
	Resp *http.Response
}

type Interceptor

type Interceptor struct {
	sync.Mutex // protects the 'enabled' field
	// contains filtered or unexported fields
}

func New

func New(logger *log.Logger, scope workspace.Scope, start func(*http.Request, int64), queueChange func(int)) *Interceptor

func (*Interceptor) Flush

func (i *Interceptor) Flush()

func (*Interceptor) HandleCallback

func (i *Interceptor) HandleCallback(req *http.Request, id int64, resp *http.Response)

func (*Interceptor) Intercept

func (i *Interceptor) Intercept(req *http.Request, id int64) (*http.Request, *http.Response)

func (*Interceptor) SetScope

func (i *Interceptor) SetScope(scope workspace.Scope)

Jump to

Keyboard shortcuts

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