filter

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2020 License: BSD-2-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	// contains filtered or unexported fields
}

Filter proxifies an URL and filter the response.

func NewFromEnv

func NewFromEnv(upLog *logrus.Entry) *Filter

NewFromEnv instantiate a Filter object from the environment variable configuration.

func NewFromJSON

func NewFromJSON(upLog *logrus.Entry, filePath string) *Filter

NewFromJSON instantiate a Filter object from the configuration file.

func NewFromYAML

func NewFromYAML(upLog *logrus.Entry, filePath string) *Filter

NewFromYAML instantiate a Filter object from the configuration file.

func (*Filter) Serve

func (f *Filter) Serve()

Serve starts a filtering http proxy.

func (*Filter) UpdateResponse

func (f *Filter) UpdateResponse(r *http.Response) error

UpdateResponse will be called back when the proxyfied server respond and filter the response if necessary.

Jump to

Keyboard shortcuts

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