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

Grammar edit for tutorial #76

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

michael-w-williams
Copy link
Member

Here is my grammar edit for the tutorial. Mostly changing verbs to active voice and simplifying sentences.

I couldn't figure out this sentence:

  • Through the context developers can access request headers, Fn application and route config as well as format-specific attributes request method, etc.

So if you have a chance, take another try at that one.

Let me know if you have any questions.

Mike W.

@denismakogon
Copy link
Member

I couldn't figure out this sentence:

  • Through the context developers can access request headers, Fn application and route config as well as format-specific attributes request method, etc.

Each function in each signature has at least 2 parameters:

  • context
  • data

So, using context parameter, developers can get an access to:

  • request headers
  • application name where this function defined
  • route config
  • request method
  • request URL

hopefully, this helps.

HTTP: the function will receive the full HTTP request
JSON: the function will receive a JSON object very similar to CNCF OpenEvents
* default: whatever an application sends inside the HTTP request body will be transferred to the function
* HTTP: the function receives the full HTTP request
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line and add:

  • cloudevent: the function receives the a CloudEvent object


Please note that FDK-Python supports only JSON format.
In contrast, HTTP and JSON formats are applied to hot functions. A hot function
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In contrast, CloudEvent and JSON formats are applied to hot functions.

HTTP format no longer supported by fdk-python

`idle_timeout` value. For a developer, the HTTP format feels like talking to a
web server because it uses simple HTTP methods. The JSON format is a bit
different because Fn automatically assembles a JSON object from the HTTP
request.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this:

the HTTP format feels like talking to a web server because it uses simple HTTP methods

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a description for cloudevent format? Here's the doc: https://github.com/fnproject/fn/blob/master/docs/developers/function-format.md#cloudevent-io-format

@michael-w-williams
Copy link
Member Author

Ok. I made the changes that you requested. Let me know what you think.

@michael-w-williams
Copy link
Member Author

Hey Denis, let's see if we can get this one merged. Looks like I may need to resolve some conflicts.

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

Successfully merging this pull request may close these issues.

2 participants