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

bug-bash: Change phase to directive in custom logic doc #8001

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions app/_src/gateway/plugin-development/custom-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ of {{site.base_gateway}}'s execution life-cycle:
- **[HTTP Module]** *is used for plugins written for HTTP/HTTPS requests*
{% if_version lte: 3.3.x %}

| Function name | Phase | Request Protocol | Description
| Function name | Directive | Request Protocol | Description
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's a bit more complicated than this. The items in this column cover both a phase and a directive. Check out the diagram here: https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#directives.

As the reporter points out in the GH issue,

It looks like what we're actually missing is another column, which details what the directive is. So for rewrite, you get:

Function: rewrite
Phase: rewrite tail
Directives: rewrite_by_lua_*

|---------------------|-------------------|-------------------------|------------
| `init_worker` | [init_worker] | * | Executed upon every Nginx worker process's startup.
| `certificate` | [ssl_certificate] | `https`, `grpcs`, `wss` | Executed during the SSL certificate serving phase of the SSL handshake.
Expand All @@ -64,7 +64,7 @@ To reduce unexpected behaviour changes, {{site.base_gateway}} does not start if

- **[Stream Module]** *is used for Plugins written for TCP and UDP stream connections*

| Function name | Phase | Description
| Function name | Directive | Description
|-----------------|------------------------------------------------------------------------------|------------
| `init_worker` | [init_worker] | Executed upon every Nginx worker process's startup.
| `preread` | [preread] | Executed once for every connection.
Expand All @@ -74,7 +74,7 @@ To reduce unexpected behaviour changes, {{site.base_gateway}} does not start if
{% endif_version %}

{% if_version gte: 3.4.x %}
| Function name | Phase | Request Protocol | Description
| Function name | Directive | Request Protocol | Description
|---------------------|---------------------|-------------------------------|------------
| `init_worker` | [init_worker] | * | Executed upon every Nginx worker process's startup.
| `configure` | [init_worker]/timer | * | Executed every time the Kong plugin iterator is rebuilt (after changes to configure plugins).
Expand All @@ -97,7 +97,7 @@ To reduce unexpected behaviour changes, {{site.base_gateway}} does not start if

- **[Stream Module]** *is used for Plugins written for TCP and UDP stream connections*

| Function name | Phase | Description
| Function name | Directive | Description
|-----------------|------------------------------------------------------------------------------|------------
| `init_worker` | [init_worker] | Executed upon every Nginx worker process's startup.
| `configure` | [init_worker]/timer | Executed every time the Kong plugin iterator is rebuilt (after changes to configure plugins).
Expand Down
Loading