Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagate Context to the handler.Request #39

Merged
merged 2 commits into from
Apr 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion template/golang-http-armhf/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ go 1.13

replace handler/function => ./function

require github.com/openfaas-incubator/go-function-sdk v0.0.0-20181217173454-cac4b8744921
require github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33
4 changes: 2 additions & 2 deletions template/golang-http-armhf/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/openfaas-incubator/go-function-sdk v0.0.0-20181217173454-cac4b8744921 h1:IGP0tlTdv6r/zy3Kw61EhiXao61krCUs5KRHWSzCdxM=
github.com/openfaas-incubator/go-function-sdk v0.0.0-20181217173454-cac4b8744921/go.mod h1:F37Kp+hwdHP+o3UKjkGzikQg4weKiMvcegT9vCQjvjE=
github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 h1:KhbcrtXR+IO7IWF08RzKpgMudBhEeRRqNmRurE1iph4=
github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33/go.mod h1:F37Kp+hwdHP+o3UKjkGzikQg4weKiMvcegT9vCQjvjE=
1 change: 1 addition & 0 deletions template/golang-http-armhf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func makeRequestHandler() func(http.ResponseWriter, *http.Request) {
Method: r.Method,
QueryString: r.URL.RawQuery,
}
req.WithContext(r.Context())

result, resultErr := function.Handle(req)

Expand Down
2 changes: 1 addition & 1 deletion template/golang-http/function/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/openfaas-incubator/go-function-sdk"
handler "github.com/openfaas-incubator/go-function-sdk"
)

// Handle a function invocation
Expand Down
2 changes: 1 addition & 1 deletion template/golang-http/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ go 1.13

replace handler/function => ./function

require github.com/openfaas-incubator/go-function-sdk v0.0.0-20181217173454-cac4b8744921
require github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33
4 changes: 2 additions & 2 deletions template/golang-http/go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github.com/openfaas-incubator/go-function-sdk v0.0.0-20181217173454-cac4b8744921 h1:IGP0tlTdv6r/zy3Kw61EhiXao61krCUs5KRHWSzCdxM=
github.com/openfaas-incubator/go-function-sdk v0.0.0-20181217173454-cac4b8744921/go.mod h1:F37Kp+hwdHP+o3UKjkGzikQg4weKiMvcegT9vCQjvjE=
github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33 h1:KhbcrtXR+IO7IWF08RzKpgMudBhEeRRqNmRurE1iph4=
github.com/openfaas-incubator/go-function-sdk v0.0.0-20200405082418-b31e65bf8a33/go.mod h1:F37Kp+hwdHP+o3UKjkGzikQg4weKiMvcegT9vCQjvjE=
1 change: 1 addition & 0 deletions template/golang-http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ func makeRequestHandler() func(http.ResponseWriter, *http.Request) {
Method: r.Method,
QueryString: r.URL.RawQuery,
}
req.WithContext(r.Context())

result, resultErr := function.Handle(req)

Expand Down