PDK

    The Plugin Development Kit is accessible from the global variable, and various functionalities are namespaced under this table, such as kong.request, , etc.

    A human-readable string containing the version number of the currently running node.

    Usage

    kong.version_num

    An integral number representing the version number of the currently running node, useful for comparison and feature-existence checks.

    Usage

    A read-only table containing the configuration of the current Kong node, based on the configuration file and environment variables.

    Comma-separated lists in the kong.conf file get promoted to arrays of strings in this table.

    Usage

    kong.db

    Instance of Kong’s DAO (the module). Contains accessor objects to various entities.

    A more thorough documentation of this DAO and new schema definitions is to be made available in the future.

    Usage

    Instance of Kong’s DNS resolver, a client object from the module.

    kong.worker_events

    Instance of Kong’s IPC module for inter-workers communication from the module.

    Note: Usage of this module is currently reserved to the core or to advanced users.

    Instance of Kong’s cluster events module for inter-nodes communication.

    Note: Usage of this module is currently reserved to the core or to advanced users.

    kong.cache

    Instance of Kong’s database caching object, from the kong.cache module.

    Note: Usage of this module is currently reserved to the core or to advanced users.