meinestadt/ms-laravel-readiness 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

meinestadt/ms-laravel-readiness

最新稳定版本:1.1.0

Composer 安装命令:

composer require meinestadt/ms-laravel-readiness

包简介

simple package to provide a readiness controller for drop-in use in projects running on k8s. tests each sql- connection and each redis connection for functionality.

README 文档

README

this class is to be used in laravel projects as a drop in readiness controller for k8s environments. it checks the connection for redis and sql to be working and active and send 503 if they are not, thus triggering the proper readiness-failed mechanisms of k8s. So this is a hardening thing.

install

to use this do the usual

composer install meinestadt/ms-laravel-readiness

configure

to be used in your application, you also need to setup the necessary route(s)

<?php

use Illuminate\Support\Facades\Route;
use Meinestadt\MsLaravelReadiness\ReadinessController;
use App\Http\Middleware\AuthenticateApiCalls;

/*
 * other routes here
 * ...
 * ...
 */

# excluding session based middleware
# bonus simplified liveness route, to be used for startup and liveness checks
Route::withoutMiddleware([
    AuthenticateApiCalls::class,
    \App\Http\Middleware\EncryptCookies::class,
    \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
    \Illuminate\Session\Middleware\StartSession::class,
    \Illuminate\View\Middleware\ShareErrorsFromSession::class,
    \App\Http\Middleware\VerifyCsrfToken::class,
])->group(function () {
    Route::get('/health/liveness', fn () => response()->json(['status' => 'ok']))->name('liveness');
    Route::get('/health/readiness', ReadinessController::class)->name('readiness');
});

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固