Redundant configuration client.
Definition at line 220 of file rconfc.h.
A dedicated confc instance initialised during m0_rconfc_start() in case the read lock is successfully acquired. Initially connected to a confd of the elected version, an element of m0_rconfc::rc_active list. Later, it may be reconnected on the fly to another confd server of the same version in case previous confd communication failed, or version re-election occurred.
Consumer is expected to use m0_rconfc::rc_confc instance for reading configuration data done any standard way in accordance with m0_confc specification. However, any explicit initialisation and finalisation of the instance must be avoided, as m0_rconfc is fully responsible for that part.
Definition at line 235 of file rconfc.h.
Rconfc expiration callback. Installed during m0_rconfc_init(), but is allowed to be re-set later if required, on a locked rconfc instance.
The callback is executed being under rconfc lock.
Rconfc expiration callback is called when rconfc election happens. The callee side must close all configuration objects currently held and invalidate locally stored configuration data copies if any.
- Note
- No configuration reading is granted during the call because of rconfc locked state. Therefore, configuration reader should schedule reading for some time in future. The callback will also be called when reaching quorum is not possible. In this case rconfc->rc_ver == M0_CONF_VER_UNKNOWN.
Definition at line 278 of file rconfc.h.
Confc instance artificially filled with objects having fids of current confd and top-level RM services got from HA. Artificial nature is because of filling its cache non-standard way at the time when conventional configuration reading is impossible due to required conf version number remaining unknown until election procedure is done.
This instance is added to HA clients list and serves HA notifications about remote confd and RM service deaths. The intention is to automatically keep herd list and top-level RM endpoint address up to date during the entire rconfc instance life cycle.
- Attention
- Never use this confc for real configuration reading. No RPC communication is possible with the instance due to the way of its initialisation.
Definition at line 378 of file rconfc.h.
Rconfc idle callback. Initially unset. Allowed to be installed later if required, on a locked rconfc instance.
The callback is executed being under rconfc lock.
Rconfc ready callback is called when m0_rconfc::rc_sm is switched to M0_RCS_IDLE state. Callback indicates that configuration is available for reading using m0_rconfc::rc_confc.
- Note
- No configuration reading is possible during the callback execution due to the locked state, and the reading should be scheduled for some time in future.
Definition at line 294 of file rconfc.h.