proxy

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DumpTopic = "violet.proxy.dump"

Variables

This section is empty.

Functions

func DisableMockRoundTrip

func DisableMockRoundTrip()

func DumpDecorator

func DumpDecorator(dump bool, dumpType DumpType, name string) ReverseProxyDecorator

func EnableMockRoundTrip

func EnableMockRoundTrip(mock func(Req) (Rsp, error))

func NewReverseProxy

func NewReverseProxy(target *url.URL) ReverseProxy

Types

type DumpMessage

type DumpMessage struct {
	DumpType    DumpType
	Name        string
	MessageType MessageType
	UnixNano    int64
	Content     []byte
	Error       error
}

type DumpType

type DumpType string
const (
	TargetDump DumpType = "TARGET"
	SourceDump DumpType = "SOURCE"
)

type MessageType

type MessageType string
const (
	ReqMessage MessageType = "REQ"
	RspMessage MessageType = "RSP"
)

Jump to

Keyboard shortcuts

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