Skip to content

Commit 1ea3af2

Browse files
committed
Roles reference
1 parent 735d4f1 commit 1ea3af2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

doc/reference/configuration/configuration_reference.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2877,6 +2877,35 @@ This section describes configuration parameters related to roles.
28772877

28782878
**Since:** :doc:`3.0.0 </release/3.0.0>`.
28792879

2880+
Application roles of an instance.
2881+
An application role is a Lua module that implement specific functions or logic.
2882+
2883+
There two types of application roles:
2884+
2885+
- Built-in roles. For example, the `CRUD <https://github.com/tarantool/crud>`__ provides the ``crud-storage`` and ``crud-router`` roles that enable CRUD operations in a sharded cluster.
2886+
- Custom roles. For example, you create a custom role to define a stored procedure or implement a supplementary service, such as an e-mail notifier or a replicator.
2887+
2888+
To create a custom role, you need to define the following functions and fields:
2889+
2890+
- ``validate()``
2891+
2892+
Validate a role's configuration.
2893+
2894+
- ``apply()``
2895+
2896+
Apply a role's configuration.
2897+
2898+
- ``stop()``:
2899+
2900+
Stop a role.
2901+
2902+
- (Optional) ``dependencies``
2903+
2904+
Define a role's dependencies.
2905+
2906+
Functions should throw an error if it occurs.
2907+
2908+
28802909
|
28812910
| Type: array
28822911
| Default: nil

0 commit comments

Comments
 (0)