wyrihaximus / react-sync-configmap-mount-to-env
🕵️♀️ Monitors and syncs configmap mount into environment variables
Fund package maintenance!
WyriHaximus
Installs: 1 714
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 0
Open Issues: 4
Language:Makefile
Requires
- php: ^8.1
- react/async: ^4@dev
- react/event-loop: ^1.3
- react/filesystem: ^0.2@dev
Requires (Dev)
- wyrihaximus/async-test-utilities: ^5.0.12
This package is auto-updated.
Last update: 2024-09-05 10:30:47 UTC
README
Monitors and syncs configmap mount into environment variables
Installation
To install via Composer, use the command below, it will automatically detect the latest version and bind it with ^
.
composer require wyrihaximus/react-sync-configmap-mount-to-env
Usage
use React\EventLoop\Loop; use WyriHaximus\React\Env\ConfigMapMountSyncer\Syncer; use function React\Async\await; use function React\Promise\Timer\sleep; getenv('Q_PRE_FETCH_COUNT'); // null file_put_contents('/etc/mounted-confimap/Q_PRE_FETCH_COUNT', 5); // Just here to show the value in the file $canceler = Syncer::sync('/etc/mounted-configmap'); Loop::addTimer(5, $canceler); // Cancels the syncer after five seconds await(sleep(6)) getenv('Q_PRE_FETCH_COUNT'); // 5
License
The MIT License (MIT)
Copyright (c) 2022 Cees-Jan Kiewiet
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.