Skip to content

Adds description of application role editing process #5237

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

Merged
merged 3 commits into from
Jul 11, 2025
Merged
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
20 changes: 15 additions & 5 deletions doc/platform/app/app_roles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,24 @@ As a result, a role module should return an object that has corresponding functi
end,
}

The examples below show how to do this.
The examples in this article show how to do this.

You can omit the optional steps and get a simple role as in the example below.

.. code-block:: lua

return {
validate = function() -- ... -- end,
apply = function() -- ... -- end,
stop = function() -- ... -- end,
}

You can modify a role, for example, by adding dependencies or specifying the on_event callback.
If you modify a role, you need to restart the Tarantool instance with the role in order to apply the changes.

.. NOTE::

Code snippets shown in this section are included from the following application: `application_role_cfg <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/config/instances.enabled/application_role_cfg>`_.
- Code snippets shown in this section are included from the following application: `application_role_cfg <https://github.com/tarantool/doc/tree/latest/doc/code_snippets/snippets/config/instances.enabled/application_role_cfg>`_.

.. _roles_create_custom_role_schema:

Expand Down Expand Up @@ -163,7 +176,6 @@ is used to validate the ``greeting`` value:

If the configuration is not valid, ``validate()`` reports an unrecoverable error by throwing an error object.


.. _roles_create_custom_role_apply:

Applying a role configuration
Expand All @@ -180,8 +192,6 @@ In the example below, the ``apply()`` function uses the :ref:`log <log-module>`
:end-before: local function stop
:dedent:



.. _roles_create_custom_role_stop:

Stopping a role
Expand Down