Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ikhoon committed Oct 22, 2024
1 parent f6a60c1 commit 1adb8ce
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public enum PluginTarget {
LEADER_ONLY,
/**
* Run the {@link Plugin} on the leader replica for a zone specified in {@link CentralDogmaConfig#zone()}.
* It would be started after the replica has taken the leadership for the zone and would be stopped when
* It would be started after the replica has taken the zone leadership and would be stopped when
* the replica is about to release the zone leadership.
*/
ZONE_LEADER_ONLY
Expand Down
16 changes: 15 additions & 1 deletion site/src/sphinx/setup-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ defaults:
"port": 36463,
"protocol": null,
"path": null
}
},
"zone": null
}
Core properties
Expand Down Expand Up @@ -262,6 +263,19 @@ Core properties

- the path of the management service. If not specified, the management service is mounted at ``/internal/management``.

- ``zone`` (string)

- the zone name of the server. If not specified, ``PluginTarget.ZONE_LEADER_ONLY`` can't be used.

- If the value starts with ``$``, the environment variable is used as the zone name.
For example, if the value is ``$ZONE_NAME``, the environment variable named ``ZONE_NAME`` is used as the
zone name.

- If the value starts with ``classpath:``, the class file is loaded via `Java SPI <https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/ServiceLoader.html>`_.
For example, if the value is ``classpath:com.example.MyZoneProvider``, the class ``com.example.MyZoneProvider``
is loaded via Java SPI. Note that the class must implement the :api:`ZoneProvider` interface.
This feature is useful when you want to provide a zone dynamically based on the environment.

.. _replication:

Configuring replication
Expand Down

0 comments on commit 1adb8ce

Please sign in to comment.