server

package
v0.0.0-...-ce453ac Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Host string
	Port string

	ReadTimeoutSeconds  int
	WriteTimeoutSeconds int

	GracefulShutdownTimeout uint

	IsEnableSwagger bool
	SwaggerURL      string
}

type Server

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

func NewServer

func NewServer(cfg AppConfig, router chi.Router, logger *zap.Logger) *Server

func (*Server) SetRouter

func (s *Server) SetRouter(router chi.Router)

func (*Server) SetShutdownCallback

func (s *Server) SetShutdownCallback(shutdownCallback func(ctx context.Context) error)

func (*Server) Start

func (s *Server) Start()

Jump to

Keyboard shortcuts

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