proxy

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DumpTopic = "viola.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 added in v0.1.4

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

type DumpType added in v0.1.4

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

type MessageType added in v0.1.4

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