server

package
v0.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package server provides a simple HTTP/HTTPS server implementation for serving static and connect API.

Package server provides a simple HTTP/HTTPS server implementation for serving static and connect API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

Server is a struct that represents a Fiber server instance with an underlying `fiber.App`, `fiber.Router` for the API endpoints, and a map of `fiber.Router` instances for different API versions.

func Create

func Create(cfgs ...fiber.Config) *Server

Create return a instance os Server Pattern Singleton

func (*Server) Register

func (server *Server) Register(handlers map[string]fiber.Handler)

API is a method of the `Server` struct that registers the provided API with the server. It creates a new version of the API router, adds the provided API to the router's namespace, and registers the new router with the server's main `app` instance.

func (*Server) Start

func (server *Server) Start() error

Start is a method of the `Server` struct that starts the server and listens for incoming HTTP and/or HTTPS requests, depending on the `config` settings.

func (*Server) Stop

func (server *Server) Stop() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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