cacheproxy

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2019 License: MIT Imports: 15 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)

Types

type Blocker

type Blocker struct {
	Ports map[int]sync.RWMutex
	Files map[string]sync.RWMutex
	// contains filtered or unexported fields
}

func (*Blocker) FileLocker

func (b *Blocker) FileLocker(file string) *sync.RWMutex

func (*Blocker) PortLocker

func (b *Blocker) PortLocker(port int) *sync.RWMutex

type Config

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

func (Config) File

func (cfg Config) File(urlPath string) string

type Manager

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

func NewManager

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

func (*Manager) RunSrv

func (m *Manager) RunSrv(ctxIn context.Context, fileName string) (int, context.CancelFunc)

func (*Manager) SetCfg

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

Jump to

Keyboard shortcuts

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