providers

package
v0.0.0-...-2ba2e4a Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 12 Imported by: 2

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) GetSurrogateControl

func (s AkamaiSurrogateStorage) GetSurrogateControl(header http.Header) (string, string)

func (AkamaiSurrogateStorage) GetSurrogateControlName

func (s AkamaiSurrogateStorage) GetSurrogateControlName() string

func (AkamaiSurrogateStorage) Invalidate

func (s AkamaiSurrogateStorage) Invalidate(method string, headers http.Header)

Invalidate the grouped responses from the Cache-Group-Invalidation HTTP response header

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, uri 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) GetSurrogateControl

func (s CloudflareSurrogateStorage) GetSurrogateControl(header http.Header) (string, string)

func (CloudflareSurrogateStorage) GetSurrogateControlName

func (s CloudflareSurrogateStorage) GetSurrogateControlName() string

func (CloudflareSurrogateStorage) Invalidate

func (s CloudflareSurrogateStorage) Invalidate(method string, headers http.Header)

Invalidate the grouped responses from the Cache-Group-Invalidation HTTP response header

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, uri 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) GetSurrogateControl

func (s FastlySurrogateStorage) GetSurrogateControl(header http.Header) (string, string)

func (FastlySurrogateStorage) GetSurrogateControlName

func (s FastlySurrogateStorage) GetSurrogateControlName() string

func (FastlySurrogateStorage) Invalidate

func (s FastlySurrogateStorage) Invalidate(method string, headers http.Header)

Invalidate the grouped responses from the Cache-Group-Invalidation HTTP response header

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) GetSurrogateControl

func (s SouinSurrogateStorage) GetSurrogateControl(header http.Header) (string, string)

func (SouinSurrogateStorage) GetSurrogateControlName

func (s SouinSurrogateStorage) GetSurrogateControlName() string

func (SouinSurrogateStorage) Invalidate

func (s SouinSurrogateStorage) Invalidate(method string, headers http.Header)

Invalidate the grouped responses from the Cache-Group-Invalidation HTTP response header

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 {
	GetSurrogateControl(http.Header) (string, string)
	GetSurrogateControlName() string

	Purge(http.Header) (cacheKeys []string, surrogateKeys []string)
	Invalidate(method string, h http.Header)

	Store(*http.Response, string, 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

func SurrogateFactory(config configurationtypes.AbstractConfigurationInterface, defaultStorerName string) SurrogateInterface

SurrogateFactory generate a SurrogateInterface instance

Jump to

Keyboard shortcuts

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