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

Cannot use context.Set in faas-flow pipeline. #151

Open
ctakgh opened this issue May 28, 2022 · 1 comment
Open

Cannot use context.Set in faas-flow pipeline. #151

ctakgh opened this issue May 28, 2022 · 1 comment

Comments

@ctakgh
Copy link

ctakgh commented May 28, 2022

Hello,

I'm investigation using faas-flow in my work environment. So far I was able to orchestrate several functions using Apply and Modify methods. My next step is to use context functionality (context.Set("data1-key", "data1-value")) to pass data between different Modify sections of pipeline based on readme info.

I am getting an exception when building faas-flow (faas build -f my-config.yml):

...Step 12/29 : RUN CGO_ENABLED=0 GOOS=linux go build --ldflags "-s -w" -a -installsuffix cgo -o handler . && go test $(go list ./... | grep -v /vendor/) -cover ---> Running in 5aa0fd96ab24 \# handler/function function/handler.go:36:10: context.Set undefined (type *openfaas.Context has no field or method Set)...

Please provide an example (like in https://github.com/faasflow/faas-flow-example) where this functionality is working.

Thank you

@ctakgh
Copy link
Author

ctakgh commented May 31, 2022

In order for faasflow.Context methods to work, need to use (*sdk.Context)(context) syntax.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant