Initial pass of very very simple, lightweight health checks entrypoints.
Showing
3 changed files
with
68 additions
and
0 deletions
MoquiConf.xml
0 → 100644
1 | <?xml version="1.0" encoding="UTF-8" ?> | ||
2 | <!-- No copyright or license for configuration file, details here are not considered a creative work. --> | ||
3 | <moqui-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd"> | ||
4 | <screen-facade> | ||
5 | <screen location="component://webroot/screen/webroot.xml"> | ||
6 | <subscreens-item name="oci-healthchecks" menu-title="OCI - Healthchecks" menu-include="false" | ||
7 | location="component://moqui-k8s/screen/MoquiOciHealthchecksRoot.xml"/> | ||
8 | </screen> | ||
9 | </screen-facade> | ||
10 | </moqui-conf> |
component.xml
0 → 100644
screen/MoquiOciHealthchecksRoot.xml
0 → 100644
1 | <!-- | ||
2 | This software is in the public domain under CC0 1.0 Universal plus a | ||
3 | Grant of Patent License. | ||
4 | |||
5 | To the extent possible under law, the author(s) have dedicated all | ||
6 | copyright and related and neighboring rights to this software to the | ||
7 | public domain worldwide. This software is distributed without any | ||
8 | warranty. | ||
9 | |||
10 | You should have received a copy of the CC0 Public Domain Dedication | ||
11 | along with this software (see the LICENSE.md file). If not, see | ||
12 | <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
13 | --> | ||
14 | <screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd" | ||
15 | standalone="true" | ||
16 | require-authentication="false"> | ||
17 | <transition name="ready"> | ||
18 | <!-- ready probes mean is moqui running. No further meaning is implied. --> | ||
19 | <actions> | ||
20 | <script> | ||
21 | def response = ec.web.response | ||
22 | response.setStatus(200) | ||
23 | response.writer.write('ok') | ||
24 | </script> | ||
25 | </actions> | ||
26 | <default-response type="none"/> | ||
27 | </transition> | ||
28 | <transition name="start"> | ||
29 | <!-- start probes should check to see if all caches have been primed, etc. --> | ||
30 | <!-- this needs work; moqui startup already does a lot of pre-caching of things. --> | ||
31 | <actions> | ||
32 | <script> | ||
33 | def response = ec.web.response | ||
34 | response.setStatus(200) | ||
35 | response.writer.write('ok') | ||
36 | </script> | ||
37 | </actions> | ||
38 | <default-response type="none"/> | ||
39 | </transition> | ||
40 | <transition name="live"> | ||
41 | <!-- this should be used to signal when moqui is busy --> | ||
42 | <actions> | ||
43 | <script> | ||
44 | def response = ec.web.response | ||
45 | response.setStatus(200) | ||
46 | response.writer.write('ok') | ||
47 | </script> | ||
48 | </actions> | ||
49 | <default-response type="none"/> | ||
50 | </transition> | ||
51 | </screen> | ||
52 |
-
Please register or sign in to post a comment