proxy

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRequestHandler

func NewRequestHandler(config RequestConfig) goproxy.ReqHandler

func NewResponseHandler

func NewResponseHandler(config ResponseConfig) goproxy.RespHandler

Types

type RequestConfig

type RequestConfig struct {
	Querier         RequestQuerier
	CacheableStatus []int
	TTL             int
	RFC9111         bool
	SharedCache     bool
	ReadOnly        bool
	Verbose         bool
}

type RequestQuerier

type RequestQuerier interface {
	FindByURL(ctx context.Context, url string) (*db.Response, error)
}

type ResponseConfig

type ResponseConfig struct {
	Writer      ResponseWriter
	RFC9111     bool
	TTL         int
	Verbose     bool
	SharedCache bool
}

type ResponseWriter

type ResponseWriter interface {
	Write(ctx context.Context, url string, resp *db.Response) error
}

Jump to

Keyboard shortcuts

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