From d0b9ad4c146161b6e230cbd73c2f2695668ac28c Mon Sep 17 00:00:00 2001
From: Liu Wei
Date: Mon, 9 Oct 2023 17:41:08 +0800
Subject: [PATCH] feat: sync from upstream release 1.6.x (#40)
---
.../build_and_test_with_resty_events.yml | 141 ++++
.../build_and_test_with_worker_events.yml | 69 ++
.github/workflows/latest_os.yml | 189 -----
.github/workflows/lint.yml | 42 --
.github/workflows/old_os.yml | 189 -----
.github/workflows/sast.yml | 31 -
.gitignore | 1 -
Makefile | 4 +-
config.ld | 2 +-
docs/index.html | 257 ++++---
docs/topics/readme.md.html | 274 +++++---
lib/resty/healthcheck.lua | 650 +++++++++++-------
lua-resty-healthcheck-2.0.0-1.src.rock | Bin 94201 -> 0 bytes
lua-resty-healthcheck-scm-1.rockspec | 6 +-
README.md => readme.md | 78 +--
.../lua-resty-healthcheck-0.1.0-1.rockspec | 26 -
.../lua-resty-healthcheck-0.2.0-1.rockspec | 26 -
.../lua-resty-healthcheck-0.3.0-1.rockspec | 26 -
.../lua-resty-healthcheck-0.4.0-1.rockspec | 27 -
.../lua-resty-healthcheck-0.4.1-1.rockspec | 27 -
.../lua-resty-healthcheck-0.4.1-2.rockspec | 27 -
.../lua-resty-healthcheck-0.4.2-1.rockspec | 27 -
.../lua-resty-healthcheck-0.4.2-2.rockspec | 27 -
.../lua-resty-healthcheck-0.5.0-1.rockspec | 27 -
.../lua-resty-healthcheck-0.5.0-2.rockspec | 27 -
.../lua-resty-healthcheck-0.6.0-1.rockspec | 27 -
.../lua-resty-healthcheck-0.6.0-2.rockspec | 27 -
.../lua-resty-healthcheck-0.6.1-1.rockspec | 27 -
.../lua-resty-healthcheck-0.6.1-2.rockspec | 27 -
.../lua-resty-healthcheck-1.0.0-1.rockspec | 27 -
.../lua-resty-healthcheck-1.0.0-2.rockspec | 27 -
.../lua-resty-healthcheck-1.1.0-1.rockspec | 27 -
.../lua-resty-healthcheck-1.1.0-2.rockspec | 27 -
.../lua-resty-healthcheck-1.1.1-1.rockspec | 27 -
.../lua-resty-healthcheck-1.1.1-2.rockspec | 27 -
.../lua-resty-healthcheck-1.1.2-1.rockspec | 27 -
.../lua-resty-healthcheck-1.1.2-2.rockspec | 27 -
.../lua-resty-healthcheck-1.2.0-1.rockspec | 26 -
.../lua-resty-healthcheck-1.2.0-2.rockspec | 26 -
.../lua-resty-healthcheck-1.3.0-1.rockspec | 27 -
.../lua-resty-healthcheck-1.3.0-2.rockspec | 27 -
.../lua-resty-healthcheck-2.0.0-1.rockspec | 27 -
...resty-healthcheck-api7-master-0-0.rockspec | 29 -
...-resty-healthcheck-iresty-1.0.1-2.rockspec | 26 -
t/18-event_handler.t | 111 ---
t/21-run_locked.t | 347 ++++++++++
t/lock-failed.t | 79 ---
t/req-headers.t | 116 ----
t/with_resty-events/00-new.t | 229 ++++++
t/with_resty-events/01-start-stop.t | 182 +++++
t/with_resty-events/02-add_target.t | 183 +++++
t/with_resty-events/03-get_target_status.t | 106 +++
t/with_resty-events/04-report_success.t | 316 +++++++++
t/with_resty-events/05-report_failure.t | 261 +++++++
t/with_resty-events/06-report_http_status.t | 499 ++++++++++++++
t/with_resty-events/07-report_tcp_failure.t | 242 +++++++
t/with_resty-events/08-report_timeout.t | 244 +++++++
t/with_resty-events/09-active_probes.t | 536 +++++++++++++++
.../10-garbagecollect.t_disabled | 105 +++
t/with_resty-events/11-clear.t | 298 ++++++++
t/with_resty-events/12-set_target_status.t | 207 ++++++
t/with_resty-events/13-integration.t_disabled | 207 ++++++
t/with_resty-events/14-tls_active_probes.t | 155 +++++
.../15-get_virtualhost_target_status.t | 322 +++++++++
.../16-set_all_target_statuses_for_hostname.t | 233 +++++++
t/with_resty-events/17-mtls.t | 145 ++++
t/with_resty-events/18-req-headers.t | 285 ++++++++
t/with_resty-events/98-get_target_list.t | 164 +++++
.../99-status_ver.t} | 30 +-
t/{ => with_resty-events}/util/cert.pem | 0
t/{ => with_resty-events}/util/key.pem | 0
t/{ => with_resty-events}/util/reindex | 0
t/{ => with_worker-events}/00-new.t | 31 +-
t/{ => with_worker-events}/01-start-stop.t | 60 +-
t/{ => with_worker-events}/02-add_target.t | 99 +--
.../03-get_target_status.t | 11 +-
.../04-report_success.t | 14 +-
.../05-report_failure.t | 24 +-
.../06-report_http_status.t | 31 +-
.../07-report_tcp_failure.t | 20 +-
.../08-report_timeout.t | 16 +-
t/{ => with_worker-events}/09-active_probes.t | 139 ++--
.../10-garbagecollect.t | 0
t/{ => with_worker-events}/11-clear.t | 122 +++-
.../12-set_target_status.t | 25 -
t/{ => with_worker-events}/13-integration.t | 7 -
.../14-tls_active_probes.t | 0
.../15-get_virtualhost_target_status.t | 14 +-
.../16-set_all_target_statuses_for_hostname.t | 13 -
t/{ => with_worker-events}/17-mtls.t | 8 +-
.../18-req-headers.t} | 15 +-
.../98-get_target_list.t} | 65 ++
.../99-status_ver.t} | 0
t/with_worker-events/util/cert.pem | 19 +
t/with_worker-events/util/key.pem | 28 +
t/with_worker-events/util/reindex | 27 +
96 files changed, 6619 insertions(+), 2483 deletions(-)
create mode 100644 .github/workflows/build_and_test_with_resty_events.yml
create mode 100644 .github/workflows/build_and_test_with_worker_events.yml
delete mode 100644 .github/workflows/latest_os.yml
delete mode 100644 .github/workflows/lint.yml
delete mode 100644 .github/workflows/old_os.yml
delete mode 100644 .github/workflows/sast.yml
delete mode 100644 lua-resty-healthcheck-2.0.0-1.src.rock
rename README.md => readme.md (70%)
delete mode 100644 rockspecs/lua-resty-healthcheck-0.1.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.2.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.3.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.4.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.4.1-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.4.1-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.4.2-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.4.2-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.5.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.5.0-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.6.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.6.0-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.6.1-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-0.6.1-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.0.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.0.0-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.1.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.1.0-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.1.1-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.1.1-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.1.2-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.1.2-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.2.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.2.0-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.3.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-1.3.0-2.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-2.0.0-1.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-api7-master-0-0.rockspec
delete mode 100644 rockspecs/lua-resty-healthcheck-iresty-1.0.1-2.rockspec
delete mode 100644 t/18-event_handler.t
create mode 100644 t/21-run_locked.t
delete mode 100644 t/lock-failed.t
delete mode 100644 t/req-headers.t
create mode 100644 t/with_resty-events/00-new.t
create mode 100644 t/with_resty-events/01-start-stop.t
create mode 100644 t/with_resty-events/02-add_target.t
create mode 100644 t/with_resty-events/03-get_target_status.t
create mode 100644 t/with_resty-events/04-report_success.t
create mode 100644 t/with_resty-events/05-report_failure.t
create mode 100644 t/with_resty-events/06-report_http_status.t
create mode 100644 t/with_resty-events/07-report_tcp_failure.t
create mode 100644 t/with_resty-events/08-report_timeout.t
create mode 100644 t/with_resty-events/09-active_probes.t
create mode 100644 t/with_resty-events/10-garbagecollect.t_disabled
create mode 100644 t/with_resty-events/11-clear.t
create mode 100644 t/with_resty-events/12-set_target_status.t
create mode 100644 t/with_resty-events/13-integration.t_disabled
create mode 100644 t/with_resty-events/14-tls_active_probes.t
create mode 100644 t/with_resty-events/15-get_virtualhost_target_status.t
create mode 100644 t/with_resty-events/16-set_all_target_statuses_for_hostname.t
create mode 100644 t/with_resty-events/17-mtls.t
create mode 100644 t/with_resty-events/18-req-headers.t
create mode 100644 t/with_resty-events/98-get_target_list.t
rename t/{19-status-ver.t => with_resty-events/99-status_ver.t} (67%)
rename t/{ => with_resty-events}/util/cert.pem (100%)
rename t/{ => with_resty-events}/util/key.pem (100%)
rename t/{ => with_resty-events}/util/reindex (100%)
rename t/{ => with_worker-events}/00-new.t (88%)
rename t/{ => with_worker-events}/01-start-stop.t (69%)
rename t/{ => with_worker-events}/02-add_target.t (60%)
rename t/{ => with_worker-events}/03-get_target_status.t (91%)
rename t/{ => with_worker-events}/04-report_success.t (96%)
rename t/{ => with_worker-events}/05-report_failure.t (92%)
rename t/{ => with_worker-events}/06-report_http_status.t (95%)
rename t/{ => with_worker-events}/07-report_tcp_failure.t (93%)
rename t/{ => with_worker-events}/08-report_timeout.t (94%)
rename t/{ => with_worker-events}/09-active_probes.t (73%)
rename t/{ => with_worker-events}/10-garbagecollect.t (100%)
rename t/{ => with_worker-events}/11-clear.t (53%)
rename t/{ => with_worker-events}/12-set_target_status.t (95%)
rename t/{ => with_worker-events}/13-integration.t (98%)
rename t/{ => with_worker-events}/14-tls_active_probes.t (100%)
rename t/{ => with_worker-events}/15-get_virtualhost_target_status.t (97%)
rename t/{ => with_worker-events}/16-set_all_target_statuses_for_hostname.t (96%)
rename t/{ => with_worker-events}/17-mtls.t (90%)
rename t/{20-req-headers.t => with_worker-events/18-req-headers.t} (93%)
rename t/{get_target_list.t => with_worker-events/98-get_target_list.t} (50%)
rename t/{status-ver.t => with_worker-events/99-status_ver.t} (100%)
create mode 100644 t/with_worker-events/util/cert.pem
create mode 100644 t/with_worker-events/util/key.pem
create mode 100755 t/with_worker-events/util/reindex
diff --git a/.github/workflows/build_and_test_with_resty_events.yml b/.github/workflows/build_and_test_with_resty_events.yml
new file mode 100644
index 00000000..eae40633
--- /dev/null
+++ b/.github/workflows/build_and_test_with_resty_events.yml
@@ -0,0 +1,141 @@
+name: Build and test
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+jobs:
+ build:
+ name: CI using lua-resty-events
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ openresty-version: [1.21.4.1]
+
+ steps:
+ - name: Update and install OS dependencies
+ run: |
+ sudo apt-get update && sudo apt-get install -y libssl-dev ssl-cert
+ sudo systemctl disable nginx
+ sudo systemctl stop nginx
+
+ - name: Set environment variables
+ env:
+ OPENRESTY_VER: ${{ matrix.openresty-version }}
+ RESTY_EVENTS_VER: 0.1.2
+ LUAROCKS_VER: 3.9.0
+ OPENSSL_VER: 1.1.1q
+ PCRE_VER: 8.45
+ run: |
+ echo "INSTALL_ROOT=/home/runner/work/cache/install-root" >> $GITHUB_ENV
+ echo "DOWNLOAD_ROOT=/home/runner/work/cache/download-root" >> $GITHUB_ENV
+ echo "OPENRESTY=$OPENRESTY_VER" >> $GITHUB_ENV
+ echo "LUAROCKS=$LUAROCKS_VER" >> $GITHUB_ENV
+ echo "OPENSSL=$OPENSSL_VER" >> $GITHUB_ENV
+ echo "PCRE=$PCRE_VER" >> $GITHUB_ENV
+ echo "RESTY_EVENTS=$RESTY_EVENTS_VER" >> $GITHUB_ENV
+ echo "LD_LIBRARY_PATH=$HOME/install-root/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
+
+ - name: Checkout lua-resty-healthcheck
+ uses: actions/checkout@v3
+
+ # - name: Lookup build cache
+ # uses: actions/cache@v3
+ # id: cache-deps
+ # with:
+ # path: |
+ # /home/runner/work/cache/install-root
+ # /home/runner/work/cache/download-root
+ # key: ${{ runner.os }}-${{ hashFiles('**/.github/workflows/build_and_test_with_resty_events.yml') }}-${{ matrix.openresty-version }}
+
+ - name: Add to Path
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: echo "$INSTALL_ROOT/bin:$INSTALL_ROOT/nginx/sbin:$INSTALL_ROOT/luajit/bin:/usr/bin" >> $GITHUB_PATH
+
+ - name: Build and install OpenSSL
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ curl -sSLO https://www.openssl.org/source/openssl-$OPENSSL.tar.gz
+ tar -xzf openssl-$OPENSSL.tar.gz
+ cd openssl-$OPENSSL
+ ./config -g shared -DPURIFY no-threads --prefix=$INSTALL_ROOT --openssldir=$INSTALL_ROOT no-unit-test
+ make
+ make install_sw
+
+ - name: Checkout lua-resty-events
+ uses: actions/checkout@v3
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ with:
+ repository: Kong/lua-resty-events
+ ref: refs/tags/0.1.0
+ path: lua-resty-events
+
+ - name: Build and install OpenResty
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ curl -sSLO https://openresty.org/download/openresty-$OPENRESTY.tar.gz
+ tar -xzf openresty-$OPENRESTY.tar.gz
+ cd openresty-$OPENRESTY
+ ./configure \
+ --prefix=$INSTALL_ROOT \
+ --with-cc-opt='-I$INSTALL_ROOT/include' \
+ --with-ld-opt='-L$INSTALL_ROOT/lib -Wl,-rpath,$INSTALL_ROOT/lib' \
+ --with-pcre-jit \
+ --with-http_ssl_module \
+ --with-http_realip_module \
+ --with-http_stub_status_module \
+ --with-http_v2_module \
+ --without-http_encrypted_session_module \
+ --with-stream_realip_module \
+ --with-stream_ssl_preread_module \
+ --add-module=../lua-resty-events \
+ --with-pcre
+ make
+ make install
+ make install LUA_LIBDIR=$INSTALL_ROOT/lualib
+
+ - name: Install LuaRocks
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ curl -sSLO https://luarocks.org/releases/luarocks-$LUAROCKS.tar.gz
+ tar -xzf luarocks-$LUAROCKS.tar.gz
+ cd luarocks-$LUAROCKS
+ ./configure \
+ --prefix=$INSTALL_ROOT \
+ --lua-suffix=jit \
+ --with-lua=$INSTALL_ROOT/luajit \
+ --with-lua-include=$INSTALL_ROOT/luajit/include/luajit-2.1
+ make build
+ make install
+
+ - name: Install manual dependencies
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ luarocks install luacheck
+
+ - name: Install Test::NGINX
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ sudo apt-get install cpanminus
+ cpanm --notest --local-lib=$HOME/perl5 local::lib && eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
+ cpanm --notest Test::Nginx
+
+ - name: Install lua-resty-events
+ if: steps.cache-deps.outputs.cache-hit != 'true'
+ run: |
+ cd lua-resty-events
+ OPENRESTY_PREFIX=$INSTALL_ROOT PREFIX=$INSTALL_ROOT LUA_LIB_DIR=$INSTALL_ROOT/lualib make install
+
+ - name: Install lua-resty-healthcheck
+ run: luarocks make
+
+ - name: Run tests
+ env:
+ PATH: ${{ env.INSTALL_ROOT }}/bin:${{ env.INSTALL_ROOT }}/nginx/sbin:${{ env.INSTALL_ROOT }}/luajit/bin:/usr/bin
+ TEST_NGINX_BINARY: ${{ env.INSTALL_ROOT }}/nginx/sbin/nginx
+ run: |
+ eval `luarocks path`
+ eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
+ TEST_NGINX_RANDOMIZE=1 prove -I. -r t/with_resty-events
diff --git a/.github/workflows/build_and_test_with_worker_events.yml b/.github/workflows/build_and_test_with_worker_events.yml
new file mode 100644
index 00000000..2954c703
--- /dev/null
+++ b/.github/workflows/build_and_test_with_worker_events.yml
@@ -0,0 +1,69 @@
+name: Build and test
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+jobs:
+ build:
+ name: CI using lua-resty-worker-events
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ openresty-version: [1.21.4.1]
+
+ steps:
+ - name: Update and install OS dependencies
+ run: |
+ sudo apt-get update && sudo apt-get install -y libssl-dev ssl-cert
+ sudo systemctl disable nginx
+ sudo systemctl stop nginx
+
+ - name: Set environment variables
+ env:
+ OPENRESTY_VER: ${{ matrix.openresty-version }}
+ run: |
+ echo "/usr/local/openresty/nginx/sbin" >> $GITHUB_PATH
+
+ - name: Checkout lua-resty-healthcheck
+ uses: actions/checkout@v3
+
+ - name: Install OpenResty ${{ matrix.openresty-version }}
+ env:
+ OPENRESTY_VER: ${{ matrix.openresty-version }}
+ run: |
+ sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates
+ wget -O - https://openresty.org/package/pubkey.gpg | sudo apt-key add -
+ echo "deb http://openresty.org/package/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/openresty.list
+ sudo apt-get update
+ sudo apt-get -y install openresty=$OPENRESTY_VER-1~focal1
+
+ - name: Install LuaRocks
+ run: sudo apt-get install -y luarocks
+
+ - name: Install manual dependencies
+ run: |
+ sudo luarocks install luacheck
+ sudo luarocks install lua-resty-worker-events 1.0.0
+
+ - name: Install Test::NGINX
+ run: |
+ sudo apt-get install cpanminus
+ cpanm --notest --local-lib=$HOME/perl5 local::lib && eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
+ cpanm --notest Test::Nginx
+
+ - name: Install lua-resty-healthcheck
+ run: sudo luarocks make lua-resty-healthcheck-scm-1.rockspec
+
+ - name: Run tests
+ run: |
+ eval `luarocks path`
+ eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
+ TEST_NGINX_RANDOMIZE=1 prove -I. -r t/with_worker-events
+
+ - name: Run debugger
+ if: ${{ failure() }}
+ uses: mxschmitt/action-tmate@v3
+ timeout-minutes: 15
diff --git a/.github/workflows/latest_os.yml b/.github/workflows/latest_os.yml
deleted file mode 100644
index a63dd30c..00000000
--- a/.github/workflows/latest_os.yml
+++ /dev/null
@@ -1,189 +0,0 @@
-name: Build and test for Ubuntu latest
-
-on: [push, pull_request]
-
-jobs:
- build:
- name: Build and install dependencies
- runs-on: ubuntu-latest
- strategy:
- matrix:
- openresty-version: [1.21.4.1]
- luarocks-version: [3.8.0]
-
- steps:
- - name: Update and install OS dependencies
- run: sudo apt-get update && sudo apt-get install -y libssl-dev ssl-cert
-
- - name: Set environment variables
- env:
- LUAROCKS_VER: ${{ matrix.luarocks-version }}
- OPENRESTY_VER: ${{ matrix.openresty-version }}
- run: |
- echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV
- export DOWNLOAD_PATH=$HOME/download-root
- echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV
- export INSTALL_PATH=$HOME/install-root
- echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV
- echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV
- export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER
- echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV
- export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER
- echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV
- echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV
-
- - name: Checkout lua-resty-healthcheck
- uses: actions/checkout@v2
-
- - name: Lookup build cache
- uses: actions/cache@v2
- id: cache-deps
- with:
- path: |
- ${{ env.INSTALL_PATH }}
- ~/perl5
- key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/latest_os.yml') }}
-
- - name: Create needed paths
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- mkdir -p $DOWNLOAD_PATH
- mkdir -p $INSTALL_PATH
-
- - name: Build and install OpenResty ${{ matrix.openresty-version }}
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- if [ ! -d $INSTALL_PATH/openresty-$OPENRESTY_VER ];
- then
- pushd $DOWNLOAD_PATH
- echo "Downloading from http://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz"
- wget -O $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz http://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz
- echo "tar -zxf $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz"
- tar -zxf $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz
- echo "result: $?"
- pushd openresty-$OPENRESTY_VER
- ./configure --prefix=$OPENRESTY_PREFIX
- make
- make install
- popd
- popd
- fi
-
- - name: Build and install LuaRocks ${{ matrix.luarocks-version }}
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- if [ ! -d $INSTALL_PATH/luarocks-$LUAROCKS_VER ];
- then
- pushd $DOWNLOAD_PATH
- echo "Downloading from https://luarocks.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz"
- wget -O $DOWNLOAD_PATH/luarocks-$LUAROCKS_VER.tar.gz https://luarocks.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz
- tar -zxf $DOWNLOAD_PATH/luarocks-$LUAROCKS_VER.tar.gz
- pushd luarocks-$LUAROCKS_VER
- ./configure --prefix=$LUAROCKS_PREFIX --with-lua=$OPENRESTY_PREFIX/luajit --with-lua-include=$OPENRESTY_PREFIX/luajit/include/luajit-2.1 --lua-suffix=jit
- make build
- make install
- popd
- luarocks install luacheck
- popd
- fi
-
- - name: Install Test::NGINX
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- if [ ! -f $DOWNLOAD_PATH/cpanm ];
- then
- wget -O $DOWNLOAD_PATH/cpanm https://cpanmin.us/
- chmod +x $DOWNLOAD_PATH/cpanm
- cpanm --notest --local-lib=$HOME/perl5 local::lib && eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
- cpanm --notest Test::Nginx
- fi
-
- lint:
- name: Static code analysis
- runs-on: ubuntu-latest
- needs: build
- strategy:
- matrix:
- openresty-version: [1.21.4.1]
- luarocks-version: [3.8.0]
- steps:
- - name: Checkout lua-resty-healthcheck
- uses: actions/checkout@v2
-
- - name: Set environment variables
- env:
- LUAROCKS_VER: ${{ matrix.luarocks-version }}
- OPENRESTY_VER: ${{ matrix.openresty-version }}
- run: |
- echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV
- export DOWNLOAD_PATH=$HOME/download-root
- echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV
- export INSTALL_PATH=$HOME/install-root
- echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV
- echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV
- export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER
- echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV
- export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER
- echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV
- echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV
-
- - name: Lookup build cache
- uses: actions/cache@v2
- id: cache-deps
- with:
- path: |
- ${{ env.INSTALL_PATH }}
- ~/perl5
- key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/latest_os.yml') }}
-
- - name: Lint code
- run: |
- eval `luarocks path`
- luacheck lib
-
- install-and-test:
- name: Test lua-resty-healthcheck
- runs-on: ubuntu-latest
- needs: build
- strategy:
- matrix:
- openresty-version: [1.21.4.1]
- luarocks-version: [3.8.0]
- steps:
- - name: Checkout lua-resty-healthcheck
- uses: actions/checkout@v2
-
- - name: Set environment variables
- env:
- LUAROCKS_VER: ${{ matrix.luarocks-version }}
- OPENRESTY_VER: ${{ matrix.openresty-version }}
- run: |
- echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV
- export DOWNLOAD_PATH=$HOME/download-root
- echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV
- export INSTALL_PATH=$HOME/install-root
- echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV
- echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV
- export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER
- echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV
- export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER
- echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV
- echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV
-
- - name: Lookup build cache
- uses: actions/cache@v2
- id: cache-deps
- with:
- path: |
- ${{ env.INSTALL_PATH }}
- ~/perl5
- key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/latest_os.yml') }}
-
- - name: Install lua-resty-healthcheck
- run: luarocks make
-
- - name: Run tests
- run: |
- eval `luarocks path`
- eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
- TEST_NGINX_RANDOMIZE=1 prove -I. -r t
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
deleted file mode 100644
index 10af9aa8..00000000
--- a/.github/workflows/lint.yml
+++ /dev/null
@@ -1,42 +0,0 @@
-name: Lint
-
-on:
- pull_request: {}
- workflow_dispatch: {}
- push:
- branches:
- - main
- - master
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: ${{ github.event_name == 'pull_request' }}
-
-jobs:
- lua-check:
- name: Lua Check
- runs-on: ubuntu-latest
- permissions:
- contents: read
- issues: read
- checks: write
- pull-requests: write
- if: (github.actor != 'dependabot[bot]')
-
- steps:
- - name: Checkout source code
- uses: actions/checkout@v3
-
- # Optional step to run on only changed files
- - name: Get changed files
- id: changed-files
- uses: tj-actions/changed-files@54849deb963ca9f24185fb5de2965e002d066e6b # v37
- with:
- files: |
- **.lua
- - name: Lua Check
- if: steps.changed-files.outputs.any_changed == 'true'
- uses: Kong/public-shared-actions/code-check-actions/lua-lint@33449c46c6766a3d3c8f167cc383381225862b36
- with:
- additional_args: '--no-default-config --config .luacheckrc'
- files: ${{ steps.changed-files.outputs.all_changed_files }}
\ No newline at end of file
diff --git a/.github/workflows/old_os.yml b/.github/workflows/old_os.yml
deleted file mode 100644
index 4d6894ed..00000000
--- a/.github/workflows/old_os.yml
+++ /dev/null
@@ -1,189 +0,0 @@
-name: Build and test for Ubuntu 20.04
-
-on: [push, pull_request]
-
-jobs:
- build:
- name: Build and install dependencies
- runs-on: ubuntu-20.04
- strategy:
- matrix:
- openresty-version: [1.21.4.1]
- luarocks-version: [3.8.0]
-
- steps:
- - name: Update and install OS dependencies
- run: sudo apt-get update && sudo apt-get install -y libssl-dev ssl-cert
-
- - name: Set environment variables
- env:
- LUAROCKS_VER: ${{ matrix.luarocks-version }}
- OPENRESTY_VER: ${{ matrix.openresty-version }}
- run: |
- echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV
- export DOWNLOAD_PATH=$HOME/download-root
- echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV
- export INSTALL_PATH=$HOME/install-root
- echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV
- echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV
- export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER
- echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV
- export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER
- echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV
- echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV
-
- - name: Checkout lua-resty-healthcheck
- uses: actions/checkout@v2
-
- - name: Lookup build cache
- uses: actions/cache@v2
- id: cache-deps
- with:
- path: |
- ${{ env.INSTALL_PATH }}
- ~/perl5
- key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/old_os.yml') }}
-
- - name: Create needed paths
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- mkdir -p $DOWNLOAD_PATH
- mkdir -p $INSTALL_PATH
-
- - name: Build and install OpenResty ${{ matrix.openresty-version }}
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- if [ ! -d $INSTALL_PATH/openresty-$OPENRESTY_VER ];
- then
- pushd $DOWNLOAD_PATH
- echo "Downloading from http://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz"
- wget -O $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz http://openresty.org/download/openresty-$OPENRESTY_VER.tar.gz
- echo "tar -zxf $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz"
- tar -zxf $DOWNLOAD_PATH/openresty-$OPENRESTY_VER.tar.gz
- echo "result: $?"
- pushd openresty-$OPENRESTY_VER
- ./configure --prefix=$OPENRESTY_PREFIX
- make
- make install
- popd
- popd
- fi
-
- - name: Build and install LuaRocks ${{ matrix.luarocks-version }}
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- if [ ! -d $INSTALL_PATH/luarocks-$LUAROCKS_VER ];
- then
- pushd $DOWNLOAD_PATH
- echo "Downloading from https://luarocks.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz"
- wget -O $DOWNLOAD_PATH/luarocks-$LUAROCKS_VER.tar.gz https://luarocks.github.io/luarocks/releases/luarocks-$LUAROCKS_VER.tar.gz
- tar -zxf $DOWNLOAD_PATH/luarocks-$LUAROCKS_VER.tar.gz
- pushd luarocks-$LUAROCKS_VER
- ./configure --prefix=$LUAROCKS_PREFIX --with-lua=$OPENRESTY_PREFIX/luajit --with-lua-include=$OPENRESTY_PREFIX/luajit/include/luajit-2.1 --lua-suffix=jit
- make build
- make install
- popd
- luarocks install luacheck
- popd
- fi
-
- - name: Install Test::NGINX
- if: steps.cache-deps.outputs.cache-hit != 'true'
- run: |
- if [ ! -f $DOWNLOAD_PATH/cpanm ];
- then
- wget -O $DOWNLOAD_PATH/cpanm https://cpanmin.us/
- chmod +x $DOWNLOAD_PATH/cpanm
- cpanm --notest --local-lib=$HOME/perl5 local::lib && eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
- cpanm --notest Test::Nginx
- fi
-
- lint:
- name: Static code analysis
- runs-on: ubuntu-20.04
- needs: build
- strategy:
- matrix:
- openresty-version: [1.21.4.1]
- luarocks-version: [3.8.0]
- steps:
- - name: Checkout lua-resty-healthcheck
- uses: actions/checkout@v2
-
- - name: Set environment variables
- env:
- LUAROCKS_VER: ${{ matrix.luarocks-version }}
- OPENRESTY_VER: ${{ matrix.openresty-version }}
- run: |
- echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV
- export DOWNLOAD_PATH=$HOME/download-root
- echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV
- export INSTALL_PATH=$HOME/install-root
- echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV
- echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV
- export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER
- echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV
- export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER
- echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV
- echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV
-
- - name: Lookup build cache
- uses: actions/cache@v2
- id: cache-deps
- with:
- path: |
- ${{ env.INSTALL_PATH }}
- ~/perl5
- key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/old_os.yml') }}
-
- - name: Lint code
- run: |
- eval `luarocks path`
- luacheck lib
-
- install-and-test:
- name: Test lua-resty-healthcheck
- runs-on: ubuntu-20.04
- needs: build
- strategy:
- matrix:
- openresty-version: [1.21.4.1]
- luarocks-version: [3.8.0]
- steps:
- - name: Checkout lua-resty-healthcheck
- uses: actions/checkout@v2
-
- - name: Set environment variables
- env:
- LUAROCKS_VER: ${{ matrix.luarocks-version }}
- OPENRESTY_VER: ${{ matrix.openresty-version }}
- run: |
- echo "DOWNLOAD_PATH=$HOME/download-root" >> $GITHUB_ENV
- export DOWNLOAD_PATH=$HOME/download-root
- echo "INSTALL_PATH=$HOME/install-root" >> $GITHUB_ENV
- export INSTALL_PATH=$HOME/install-root
- echo "LUAROCKS_VER=$LUAROCKS_VER" >> $GITHUB_ENV
- echo "OPENRESTY_VER=$OPENRESTY_VER" >> $GITHUB_ENV
- export LUAROCKS_PREFIX=$INSTALL_PATH/luarocks-$LUAROCKS_VER
- echo "LUAROCKS_PREFIX=$LUAROCKS_PREFIX" >> $GITHUB_ENV
- export OPENRESTY_PREFIX=$INSTALL_PATH/openresty-$OPENRESTY_VER
- echo "OPENRESTY_PREFIX=$OPENRESTY_PREFIX" >> $GITHUB_ENV
- echo "PATH=$DOWNLOAD_PATH:$LUAROCKS_PREFIX/bin:$OPENRESTY_PREFIX/nginx/sbin:$DOWNLOAD_PATH/cpanm:$PATH" >> $GITHUB_ENV
-
- - name: Lookup build cache
- uses: actions/cache@v2
- id: cache-deps
- with:
- path: |
- ${{ env.INSTALL_PATH }}
- ~/perl5
- key: ${{ runner.os }}-${{ matrix.openresty-version }}-${{ hashFiles('.github/workflows/old_os.yml') }}
-
- - name: Install lua-resty-healthcheck
- run: luarocks make
-
- - name: Run tests
- run: |
- eval `luarocks path`
- eval $(perl -I $HOME/perl5/lib/perl5/ -Mlocal::lib)
- TEST_NGINX_RANDOMIZE=1 prove -I. -r t
diff --git a/.github/workflows/sast.yml b/.github/workflows/sast.yml
deleted file mode 100644
index ecc76413..00000000
--- a/.github/workflows/sast.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-name: SAST
-
-on:
- pull_request:
- paths:
- - lib/**.lua
- push:
- branches:
- - master
- - main
- paths:
- - lib/**.lua
- workflow_dispatch: {}
-
-
-jobs:
- semgrep:
- name: Semgrep SAST
- runs-on: ubuntu-latest
- permissions:
- # required for all workflows
- security-events: write
- # only required for workflows in private repositories
- actions: read
- contents: read
-
- if: (github.actor != 'dependabot[bot]')
-
- steps:
- - uses: actions/checkout@v3
- - uses: Kong/public-shared-actions/security-actions/semgrep@33449c46c6766a3d3c8f167cc383381225862b36
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index b9321004..852c1b9a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,4 +8,3 @@ ctags
tags
a.lua
.DS_Store
-.idea/
diff --git a/Makefile b/Makefile
index eaf80bdc..1b7e6b59 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ LUA_INCLUDE_DIR ?= $(PREFIX)/include
LUA_LIB_DIR ?= $(PREFIX)/lib/lua/$(LUA_VERSION)
INSTALL ?= install
-.PHONY: all test install deps
+.PHONY: all test install
all: ;
@@ -16,5 +16,3 @@ install: all
test: all
PATH=$(OPENRESTY_PREFIX)/nginx/sbin:$$PATH prove -I../test-nginx/lib -r t
-deps:
- luarocks install rockspecs/lua-resty-healthcheck-api7-master-0-0.rockspec --only-deps
\ No newline at end of file
diff --git a/config.ld b/config.ld
index 192b8cc8..70432802 100644
--- a/config.ld
+++ b/config.ld
@@ -4,7 +4,7 @@ description='Provides active and passive healthchecks (http and tcp) for OpenRes
format='discount'
file='./lib/'
dir='docs'
-readme='README.md'
+readme='readme.md'
sort=true
sort_modules=true
all=false
diff --git a/docs/index.html b/docs/index.html
index 6492afd6..52451055 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -27,8 +27,10 @@
lua-resty-healthcheck
+
Contents
Topics
@@ -51,34 +53,42 @@ Topics
Module resty.healthcheck
Healthcheck library for OpenResty.
-
-
-
-
Some notes on the usage of this library:
+ Some notes on the usage of this library:
- Each target will have 4 counters, 1 success counter and 3 failure
- counters ('http', 'tcp', and 'timeout'). Any failure will only reset the
- success counter, but a success will reset all three failure counters.
- All targets are uniquely identified by their IP address and port number
- combination, most functions take those as arguments.
- All keys in the SHM will be namespaced by the healthchecker name as
- provided to the new function. Hence no collissions will occur on shm-keys
- as long as the name
is unique.
- Active healthchecks will be synchronized across workers, such that only
- a single active healthcheck runs.
- Events will be raised in every worker, see lua-resty-worker-events
- for details.
+Each target will have 4 counters, 1 success counter and 3 failure
+counters (‘http’, ‘tcp’, and ‘timeout’). Any failure will only reset the
+success counter, but a success will reset all three failure counters.
+All targets are uniquely identified by their IP address and port number
+combination, most functions take those as arguments.
+All keys in the SHM will be namespaced by the healthchecker name as
+provided to the new function. Hence no collissions will occur on shm-keys
+as long as the name
is unique.
+Active healthchecks will be synchronized across workers, such that only
+a single active healthcheck runs.
+Events will be raised in every worker, see lua-resty-worker-events
+for details.
+
Info:
- - Copyright: 2017-2020 Kong Inc.
+ - Copyright: 2017-2023 Kong Inc.
- License: Apache 2.0
- Author: Hisham Muhammad, Thijs Schreijer
+
+
@@ -97,6 +107,10 @@
Clear all healthcheck data. |
+ checker:delayed_clear (delay) |
+ Clear all healthcheck data after a period of time. |
+
+
checker:get_target_status (ip, port, hostname) |
Get the current status of the target. |
@@ -156,6 +170,61 @@
+
+
+
+ -
+
+ run_locked (self, key, fn, ...)
+
+ -
+
Acquire a lock and run a function
+
+ The function call itself is wrapped with pcall to protect against
+ exception.
+
+ This function exhibits some special behavior when called during a
+ non-yieldable phase such as init_worker
or log
:
+
+
+- The lock timeout is set to 0 to ensure that
resty.lock
does not
+attempt to sleep/yield
+- If acquiring the lock fails due to a timeout, run_locked
+(this function) is re-scheduled to run in a timer. In this case,
+the function returns
"scheduled"
+
+
+
+
+
+ Parameters:
+
+ - self
+ The checker object
+
+ - key
+ the key/identifier to acquire a lock for
+
+ - fn
+ The function to execute
+
+ - ...
+ arguments that will be passed to fn
+
+
+
+ Returns:
+
+
+ The results of the function; or nil and an error message
+ in case it fails locking.
+
+
+
+
+
+
+
@@ -186,12 +255,12 @@ Fields:
mostly_healthy
This event is raised when the target status is
- still healthy but it started to receive "unhealthy" updates via active or
+ still healthy but it started to receive “unhealthy” updates via active or
passive checks.
mostly_unhealthy
This event is raised when the target status is
- still unhealthy but it started to receive "healthy" updates via active or
+ still unhealthy but it started to receive “healthy” updates via active or
passive checks.
@@ -215,7 +284,7 @@ Usage:
end
end
-worker_events.register(event_callback, my_checker.EVENT_SOURCE)
+worker_events.register(event_callback, my_checker.EVENT_SOURCE)
@@ -230,9 +299,7 @@
Add a target to the healthchecker.
When the ip + port + hostname combination already exists, it will simply
- return success (without updating is_healthy
status).
-
- NOTE: in non-yieldable contexts, this will be executed async.
+ return success (without updating is_healthy
status).
Parameters:
@@ -272,12 +339,36 @@ Returns:
checker:clear ()
- Clear all healthcheck data.
+ Clear all healthcheck data.
+
+
+
+ Returns:
+
+
+ true
on success, or nil + error
on failure.
+
- NOTE: in non-yieldable contexts, this will be executed async.
+
+
+
+ checker:delayed_clear (delay)
+
+
+ Clear all healthcheck data after a period of time.
+ Useful for keeping target status between configuration reloads.
+
+
+ Parameters:
+
+ - delay
+ delay in seconds before purging target state.
+
+
+
Returns:
@@ -325,9 +416,7 @@ Returns:
-
Remove a target from the healthchecker.
- The target not existing is not considered an error.
-
-
NOTE: in non-yieldable contexts, this will be executed async.
+ The target not existing is not considered an error.
Parameters:
@@ -367,13 +456,11 @@