httpserver

package
v0.0.0-...-19dc864 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package httpserver implements HTTP server.

Package httpserver implements HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

Option -.

func IdleTimeout

func IdleTimeout(timeout time.Duration) Option

IdleTimeout -.

func Port

func Port(port string) Option

Port -.

func ReadTimeout

func ReadTimeout(timeout time.Duration) Option

ReadTimeout -.

func ShutdownTimeout

func ShutdownTimeout(timeout time.Duration) Option

ShutdownTimeout -.

func WriteTimeout

func WriteTimeout(timeout time.Duration) Option

WriteTimeout -.

type OptionFiber

type OptionFiber func(*ServerFiber)

Option -.

func PortFiber

func PortFiber(port string) OptionFiber

Port -.

func Prefork

func Prefork(prefork bool) OptionFiber

Prefork -. Prefork -.

func ReadTimeoutc

func ReadTimeoutc(timeout time.Duration) OptionFiber

ReadTimeout -.

func ShutdownTimeoutOptionFiber

func ShutdownTimeoutOptionFiber(timeout time.Duration) OptionFiber

ShutdownTimeout -.

func WriteTimeoutOptionFiber

func WriteTimeoutOptionFiber(timeout time.Duration) OptionFiber

// WriteTimeout -.

type Server

type Server struct {
	App *gin.Engine
	// contains filtered or unexported fields
}

Server -.

func New

func New(cfg *config.Config, opts ...Option) *Server

New -.

func (*Server) Notify

func (s *Server) Notify() <-chan error

Notify -.

func (*Server) Shutdown

func (s *Server) Shutdown() error

Shutdown -.

func (*Server) Start

func (s *Server) Start()

Start -.

type ServerFiber

type ServerFiber struct {
	App *fiber.App
	// contains filtered or unexported fields
}

Server -.

func NewFiber

func NewFiber(opts ...OptionFiber) *ServerFiber

New -.

func (*ServerFiber) NotifyFiber

func (s *ServerFiber) NotifyFiber() <-chan error

Notify -.

func (*ServerFiber) ShutdownFiber

func (s *ServerFiber) ShutdownFiber() error

Shutdown -.

func (*ServerFiber) StartFiber

func (s *ServerFiber) StartFiber()

Start -.

Jump to

Keyboard shortcuts

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