shutdown

package
v1.13.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package shutdown provides graceful shutdown functionality for applications. It handles cleanup of resources, connections, and telemetry providers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartServerWithGracefulShutdown

func StartServerWithGracefulShutdown(
	app *fiber.App,
	licenseClient *libLicense.LicenseClient,
	telemetry *opentelemetry.Telemetry,
	serverAddress string,
	logger log.Logger,
)

StartServerWithGracefulShutdown starts the Fiber server in a goroutine and sets up graceful shutdown handling.

Types

type GracefulShutdown

type GracefulShutdown struct {
	// contains filtered or unexported fields
}

GracefulShutdown handles the graceful shutdown of application components. It's designed to be reusable across different services.

func NewGracefulShutdown

func NewGracefulShutdown(
	app *fiber.App,
	licenseClient *libLicense.LicenseClient,
	telemetry *opentelemetry.Telemetry,
	logger log.Logger,
) *GracefulShutdown

NewGracefulShutdown creates a new instance of GracefulShutdown.

func (*GracefulShutdown) HandleShutdown

func (gs *GracefulShutdown) HandleShutdown()

HandleShutdown sets up signal handling and executes the shutdown sequence when a termination signal is received.

Jump to

Keyboard shortcuts

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