gsfiber

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package gsfiber is the Fiber v2 adapter for the gscore graceful-shutdown engine. See the sibling gsfiberv3 package for Fiber v3.

Index

Constants

View Source
const (
	PhasePreStop   = gscore.PhasePreStop
	PhaseDrain     = gscore.PhaseDrain
	PhasePostDrain = gscore.PhasePostDrain
	PhaseDB        = gscore.PhaseDB
	PhasePostDB    = gscore.PhasePostDB
)

Phase enum re-exports for ergonomic registration.

Variables

This section is empty.

Functions

func ReadinessHandler

func ReadinessHandler(m *Manager) fiber.Handler

ReadinessHandler returns a Fiber v2 handler suitable for a Kubernetes readiness probe. It returns 200 while the Manager is ready and 503 once shutdown has begun, so kube-proxy can remove the pod from service endpoints before in-flight requests are drained.

func RegisterApp

func RegisterApp(m *Manager, app *fiber.App)

RegisterApp adds a Fiber v2 app to be drained during the drain phase.

Types

type Config

type Config = gscore.Config

Config re-exports the core Config.

type Hook

type Hook = gscore.Hook

Hook re-exports the core Hook.

type Manager

type Manager = gscore.Manager

Manager re-exports the core Manager so callers do not need a second import for the common case.

func New

func New(cfg Config) *Manager

New constructs a Manager with the given Config.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL