mirror of
https://github.com/makeplane/plane.git
synced 2026-07-13 05:49:40 +02:00
* feat: added worker for executing and scheduling parallel tasks * feat: implemented worker based execution over cron handlers * feat: added router to package to run go fiber for dns validation * chore: added router package to go workspace * feat: added dns route controller * feat: added dns validation handler for route * feat: added healthcheck as a core function * feat: implemented worker for scheduling and running multiple tasks over goroutines * feat: added cron and http start handlers * feat: added prime scheduler handler to comply with prime scheduler * feat: implemented worker in cli start command * feat: added tests for dns validation handler * feat: added run test script to run test inside monitor * feat: added test for background worker * feat: implemented graceful shutdown for cancellation of jobs * feat: added readme for core package * fix: worker cancellation of tasks with ctx * fix: added closing channels in worker * fix: handled case for repeated keys in dns validation endpoint
Monitor
Monitor a package written in go, aims to provide services responsible for
healthcheck, feature flagging and validation of entities with respect to
deployments. The services of Monitor are encapsulated in a command line
interface inside the ./cli folder and all the features are encapsulated
inside packages inside the lib folder ./lib folder.
Convention and Adding New Features
- Each feature lies on a seprate module, and for every module, there must be it's individual tests and readme associated with it, with the function signatures associated with it.
- Examples must be provided for each of the functions that are present inside the package that, it can be used as a reference manual.
- Every function should be written in such a way such that it can be consumed by any external host, maybe used with cron, http, cli or a seprate package on itself. Passing callback functions are sometimes best for such scenarios.
Running and Usage of Monitor
Monitor relies on 4 different environment variables of execution, which are listed below,
PRIME_HOST: The host for the prime service, defaults tohttps://prime.plane.so.LICENSE_KEY: The client's license key, required for validation purposes of the api requests to the prime server.LICENSE_VERSION: The currently used version by the client, it's generally the plane app version, but it's required and needed to be passed.MACHINE_SIGNATURE: Machine signature field indicates the machine signature of the host machine. Say you're using monitor as a docker image on a mac, then we would require theMACHINE_SIGNATUREof mac, assuming mac's machine signature is associated with the license.
You can build monitor, with make build and test it with make test. Monitor
can be run with --help command, to check the capabilites of it.