cache

package
v0.0.0-...-9b02830 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApisCacheGet

func ApisCacheGet(key string) ([]byte, error)

func ApisCacheStore

func ApisCacheStore(key string, value []byte)

func GApiCacheGet

func GApiCacheGet(key string) ([]byte, error)

func GApiCacheKey

func GApiCacheKey(c *routing.Context) string

func GApiCacheStore

func GApiCacheStore(key string, value []byte)

func InitCachingService

func InitCachingService()

func InvalidateCache

func InvalidateCache()

func OAuthCacheGet

func OAuthCacheGet(key string) ([]byte, error)

func OAuthCacheStore

func OAuthCacheStore(key string, value []byte)

func RemoveCache

func RemoveCache(key string, value []byte)

func ResponseCacheGApi

func ResponseCacheGApi(c *routing.Context) error

func ServiceDiscoveryCacheGet

func ServiceDiscoveryCacheGet(key string) ([]byte, error)

func ServiceDiscoveryCacheStore

func ServiceDiscoveryCacheStore(key string, value []byte)

func StoreCacheGApi

func StoreCacheGApi(c *routing.Context) error

func StoreRequestInfoToCache

func StoreRequestInfoToCache(c *routing.Context, requestInfo CachedRequest)

Types

type Cache

type Cache struct {
	ServiceDiscovery *bigcache.BigCache
	Apis             *bigcache.BigCache
	OAuth            *bigcache.BigCache
	// contains filtered or unexported fields
}
var GatewayCache Cache

type CachedRequest

type CachedRequest struct {
	Service               service.Service
	UpdateServiceCache    bool
	Protection            thirdpartyauthentication.ProtectionInfo
	UpdateProtectionCache bool
	Response              http.ResponseInfo
	UpdateResponseCache   bool
}

func GetCacheForRequest

func GetCacheForRequest(c *routing.Context) CachedRequest

Jump to

Keyboard shortcuts

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