cacheproxy

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2019 License: MIT Imports: 17 Imported by: 0

README

cacheproxy

proxy cache for offline testing

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Server added in v0.0.2

func Server(ctx context.Context, cfg *Config) error

Types

type Config

type Config struct {
	Host             string
	Scheme           string
	Port             int
	PemPath, KeyPath string
	StorePath        string
	FileName         string
	Verbose          bool
	ForceSave        bool
	DynamyFileName   bool
	URL              *url.URL
}

func (*Config) File

func (cfg *Config) File(urlPath string) string

type Manager

type Manager struct {
	LastPort int
	PortFrom int
	PortTo   int
	AllPorts []int
	// contains filtered or unexported fields
}

func NewManager

func NewManager(portFrom, portTo int, cfg *Config) *Manager

func (*Manager) RunSrv

func (m *Manager) RunSrv(ctx context.Context, fileName string) (int, error)

func (*Manager) SetCfg

func (m *Manager) SetCfg(cfg *Config)

type PortBlocker added in v0.0.3

type PortBlocker struct {
	Ports map[int]*sync.RWMutex
	// contains filtered or unexported fields
}

func (*PortBlocker) Lock added in v0.0.3

func (b *PortBlocker) Lock(port int)

func (*PortBlocker) Unlock added in v0.0.3

func (b *PortBlocker) Unlock(port int)

Jump to

Keyboard shortcuts

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