docs: lua filter (#279)

Signed-off-by: Matt Klein <mklein@lyft.com>
pull/280/head^2
Matt Klein 7 years ago committed by htuch
parent 7631af005d
commit 3906d547ef
  1. 1
      api/BUILD
  2. 14
      api/filter/http/lua.proto
  3. 1
      docs/build.sh
  4. 21
      docs/root/api-v1/http_filters/lua_filter.rst
  5. 3
      docs/root/api-v2/filter/http/http.rst
  6. 16
      docs/root/configuration/http_filters/lua_filter.rst

@ -147,6 +147,7 @@ proto_library(
":protocol",
":rds",
"//api/filter/accesslog:accesslog",
"//api/filter/http:lua",
"//api/filter/network:http_connection_manager",
"//api/filter/network:mongo_proxy",
],

@ -2,9 +2,15 @@ syntax = "proto3";
package envoy.api.v2.filter.http;
// The Lua filter allows for generic scripting in an HTTP filter context.
// TODO(mattklein123): Link to filter docs.
import "validate/validate.proto";
// [#protodoc-title: Lua]
// Lua :ref:`configuration overview <config_http_filters_lua>`.
message Lua {
// The Lua code to execute.
string inline_code = 1;
// The Lua code that Envoy will execute. This can be a very small script that
// further loads code from disk if desired. Note that if JSON configuration is used, the code must
// be properly escaped. YAML configuration may be easier to read since YAML supports multi-line
// strings so complex scripts can be easily expressed inline in the configuration.
string inline_code = 1 [(validate.rules).string.min_len = 1];
}

@ -38,6 +38,7 @@ PROTO_RST="
/api/sds/api/sds.proto.rst
/api/filter/accesslog/accesslog/api/filter/accesslog/accesslog.proto.rst
/api/filter/fault/api/filter/fault.proto.rst
/api/filter/http/lua/api/filter/http/lua.proto.rst
/api/filter/network/http_connection_manager/api/filter/network/http_connection_manager.proto.rst
/api/filter/network/mongo_proxy/api/filter/network/mongo_proxy.proto.rst
/api/protocol/api/protocol.proto.rst

@ -0,0 +1,21 @@
.. _config_http_filters_lua_v1:
Lua
===
Lua :ref:`configuration overview <config_http_filters_lua>`.
.. code-block:: json
{
"name": "lua",
"config": {
"inline_code": "..."
}
}
inline_code
*(required, string)* The Lua code that Envoy will execute. This can be a very small script that
further loads code from disk if desired. Note that if JSON configuration is used, the code must
be properly escaped. YAML configuration may be easier to read since YAML supports multi-line
strings so complex scripts can be easily expressed inline in the configuration.

@ -8,4 +8,5 @@ HTTP filters
.. toctree::
:glob:
:maxdepth: 2
*

@ -55,20 +55,8 @@ API.
Configuration
-------------
.. code-block:: json
{
"name": "lua",
"config": {
"inline_code": "..."
}
}
inline_code
*(required, string)* The Lua code that Envoy will execute. This can be a very small script that
further loads code from disk if desired. Note that if JSON configuration is used, the code must
be properly escaped. YAML configuration may be easier to read since YAML supports multi-line
strings so complex scripts can be easily expressed inline in the configuration.
* :ref:`v1 configuration <config_http_filters_lua_v1>`
* :ref:`v2 configuration <envoy_api_msg_filter.http.Lua>`
Script examples
---------------

Loading…
Cancel
Save