server

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package server hosts the shared HTTP server lifecycle for admin and proxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseServer

type BaseServer struct {
	Name   string
	Addr   string
	Router *fiber.App
	// contains filtered or unexported fields
}

func NewBaseServer

func NewBaseServer(name, addr string, cfg config.ServerConfig, logger *slog.Logger) *BaseServer

func (*BaseServer) WithRouters

func (s *BaseServer) WithRouters(routers ...router.ServerRouter) *BaseServer

type Server

type Server interface {
	Run() error
	Shutdown() error
}

Server is the lifecycle contract for an HTTP listener.

func NewHTTPServer

func NewHTTPServer(
	name, addr string,
	cfg config.ServerConfig,
	logger *slog.Logger,
	routers []router.ServerRouter,
) Server

Directories

Path Synopsis
Package router declares the ServerRouter contract wired into BaseServer.
Package router declares the ServerRouter contract wired into BaseServer.

Jump to

Keyboard shortcuts

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