Code Explainers

Code explainers tagged #health-check

go
package health
 
import (
	"context"

Building a health check endpoint in Go

health-check context-timeout dependency-probing
Intermediate 8 steps
javascript
const express = require('express');
const router = express.Router();
const { pool } = require('../db');
const redis = require('../redis');

Building a health check endpoint in Express

health-check timeouts promise-race
Intermediate 9 steps
ruby
class HealthController < ApplicationController
  skip_before_action :authenticate_user!, raise: false
  skip_forgery_protection
 

Building a health check endpoint in Rails

health-check monitoring error-handling
Intermediate 7 steps
rust
use std::time::Duration;
 
use axum::{extract::State, http::StatusCode, response::IntoResponse, Json};
use serde::Serialize;

A timeout-guarded health check in Axum

health-check timeout error-handling
Intermediate 6 steps
java
package com.example.monitoring;
 
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.HealthIndicator;

A custom replica health check in Spring

health-check actuator monitoring
Intermediate 7 steps