headerfilter

package
v0.16.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache provides a means of caching headerfilter.Filters in memory to reduce load on an underlying storage mechanism.

func (*Cache) Clear

func (c *Cache) Clear()

Clear will drop the currently loaded filters, triggering a reload on next call to ._Match().

func (*Cache) InverseMatch

func (c *Cache) InverseMatch(h http.Header, load func() ([]*gtsmodel.HeaderFilter, error)) (string, string, error)

InverseMatch performs .InverseMatch() on cached headerfilter.Filters, loading using callback if necessary.

func (*Cache) RegularMatch

func (c *Cache) RegularMatch(h http.Header, load func() ([]*gtsmodel.HeaderFilter, error)) (string, string, error)

RegularMatch performs .RegularMatch() on cached headerfilter.Filters, loading using callback if necessary.

Jump to

Keyboard shortcuts

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