mirror of
https://github.com/openfaas/faas.git
synced 2025-06-18 12:06:37 +00:00
Extract a caching function_query type
This type abstracts the function_query type and introduces an interface for testing and substitution. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
2bfca6d848
commit
18f6c720b5
@ -161,8 +161,10 @@ func main() {
|
||||
}
|
||||
|
||||
queueFunctionCache := scaling.NewFunctionCache(scalingConfig.CacheExpiry)
|
||||
functionQuery := scaling.NewCachedFunctionQuery(queueFunctionCache, externalServiceQuery)
|
||||
|
||||
faasHandlers.QueuedProxy = handlers.MakeNotifierWrapper(
|
||||
handlers.MakeCallIDMiddleware(handlers.MakeQueuedProxy(metricsOptions, true, natsQueue, trimURLTransformer, config.Namespace, queueFunctionCache, externalServiceQuery)),
|
||||
handlers.MakeCallIDMiddleware(handlers.MakeQueuedProxy(metricsOptions, natsQueue, trimURLTransformer, config.Namespace, functionQuery)),
|
||||
forwardingNotifiers,
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user