mirror of
https://github.com/openfaas/faas.git
synced 2025-06-21 10:16:32 +00:00
Add feature for invoking namespaced functions
When coupled with the latest version of faas-netes, the gateway can now invoke, query and deploy functions into alternative namespaces. Tested e2e by creating a namespace "fn" and deploying, then invoking a function deployed there and in the default namespace. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
0a90125aba
commit
238ce1be23
@ -66,7 +66,7 @@ func getServiceName(urlValue string) string {
|
||||
forward := "/function/"
|
||||
if strings.HasPrefix(urlValue, forward) {
|
||||
// With a path like `/function/xyz/rest/of/path?q=a`, the service
|
||||
// name we wish to locate is just the `xyz` portion. With a postive
|
||||
// name we wish to locate is just the `xyz` portion. With a positive
|
||||
// match on the regex below, it will return a three-element slice.
|
||||
// The item at index `0` is the same as `urlValue`, at `1`
|
||||
// will be the service name we need, and at `2` the rest of the path.
|
||||
|
Reference in New Issue
Block a user