providers

package
v0.0.0-...-fd6c280 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AkamaiSurrogateStorage

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

AkamaiSurrogateStorage is the layer for Surrogate-key support storage

func (AkamaiSurrogateStorage) Destruct

func (s AkamaiSurrogateStorage) Destruct() error

Destruct method will shutdown properly the provider

func (AkamaiSurrogateStorage) List

func (s AkamaiSurrogateStorage) List() map[string]string

List returns the stored keys associated to resources

func (AkamaiSurrogateStorage) ParseHeaders

func (s AkamaiSurrogateStorage) ParseHeaders(value string) []string

func (*AkamaiSurrogateStorage) Purge

func (a *AkamaiSurrogateStorage) Purge(header http.Header) (cacheKeys []string, surrogateKeys []string)

Purge purges the urls associated to the tags

func (*AkamaiSurrogateStorage) Store

func (a *AkamaiSurrogateStorage) Store(response *http.Response, cacheKey string) error

Store stores the response tags located in the first non empty supported header

type CloudflareSurrogateStorage

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

CloudflareSurrogateStorage is the layer for Surrogate-key support storage

func (CloudflareSurrogateStorage) Destruct

func (s CloudflareSurrogateStorage) Destruct() error

Destruct method will shutdown properly the provider

func (CloudflareSurrogateStorage) List

func (s CloudflareSurrogateStorage) List() map[string]string

List returns the stored keys associated to resources

func (CloudflareSurrogateStorage) ParseHeaders

func (s CloudflareSurrogateStorage) ParseHeaders(value string) []string

func (*CloudflareSurrogateStorage) Purge

func (c *CloudflareSurrogateStorage) Purge(header http.Header) (cacheKeys []string, surrogateKeys []string)

Purge purges the urls associated to the tags

func (*CloudflareSurrogateStorage) Store

func (c *CloudflareSurrogateStorage) Store(response *http.Response, cacheKey string) error

Store stores the response tags located in the first non empty supported header

type FastlySurrogateStorage

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

FastlySurrogateStorage is the layer for Surrogate-key support storage

func (FastlySurrogateStorage) Destruct

func (s FastlySurrogateStorage) Destruct() error

Destruct method will shutdown properly the provider

func (FastlySurrogateStorage) List

func (s FastlySurrogateStorage) List() map[string]string

List returns the stored keys associated to resources

func (FastlySurrogateStorage) ParseHeaders

func (s FastlySurrogateStorage) ParseHeaders(value string) []string

func (*FastlySurrogateStorage) Purge

func (f *FastlySurrogateStorage) Purge(header http.Header) (cacheKeys []string, surrogateKeys []string)

Purge purges the urls associated to the tags

func (FastlySurrogateStorage) Store

func (s FastlySurrogateStorage) Store(response *http.Response, cacheKey string) error

Store will take the lead to store the cache key for each provided Surrogate-key

type SouinSurrogateStorage

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

SouinSurrogateStorage is the layer for Surrogate-key support storage

func (SouinSurrogateStorage) Destruct

func (s SouinSurrogateStorage) Destruct() error

Destruct method will shutdown properly the provider

func (SouinSurrogateStorage) List

func (s SouinSurrogateStorage) List() map[string]string

List returns the stored keys associated to resources

func (SouinSurrogateStorage) ParseHeaders

func (s SouinSurrogateStorage) ParseHeaders(value string) []string

func (SouinSurrogateStorage) Purge

func (s SouinSurrogateStorage) Purge(header http.Header) (cacheKeys []string, surrogateKeys []string)

Purge take the request headers as parameter, retrieve the associated cache keys for the Surrogate-Key given. It returns an array which one contains the cache keys to invalidate.

func (SouinSurrogateStorage) Store

func (s SouinSurrogateStorage) Store(response *http.Response, cacheKey string) error

Store will take the lead to store the cache key for each provided Surrogate-key

type SurrogateInterface

type SurrogateInterface interface {
	Purge(http.Header) (cacheKeys []string, surrogateKeys []string)

	Store(*http.Response, string) error

	ParseHeaders(string) []string
	List() map[string]string

	Destruct() error
	// contains filtered or unexported methods
}

SurrogateInterface represents the interface to implement to be part

func SurrogateFactory

SurrogateFactory generate a SurrogateInterface instance

Jump to

Keyboard shortcuts

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