invalidator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyFields = errors.New("Minimum one mandatory field")

ErrEmptyFields ...

View Source
var ErrMaxWorkersZero = errors.New("MaxWorkers must be greater than 0")

ErrMaxWorkersZero ...

Functions

func ReleaseEntry

func ReleaseEntry(e *Entry)

ReleaseEntry ...

Types

type Config

type Config struct {
	FileConfig config.Invalidator
	Cache      *cache.Cache

	LogLevel  logger.Level
	LogOutput io.Writer
}

Config ...

type Entry

type Entry struct {
	Host   string      `json:"host"`
	Path   string      `json:"path"`
	Header EntryHeader `json:"header"`
}

Entry ...

func AcquireEntry

func AcquireEntry() *Entry

AcquireEntry ...

func (*Entry) Reset

func (e *Entry) Reset()

Reset ...

type EntryHeader

type EntryHeader struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

EntryHeader ...

func (*EntryHeader) Reset

func (h *EntryHeader) Reset()

Reset ...

type Invalidator

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

Invalidator ...

func New

func New(cfg Config) (*Invalidator, error)

New ...

func (*Invalidator) Add

func (i *Invalidator) Add(e Entry) error

Add ..

func (*Invalidator) Start

func (i *Invalidator) Start()

Start ...

Jump to

Keyboard shortcuts

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