webserver

package
v0.0.0-...-5b7b456 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServerStatusNone = iota
	ServerStatusInitialized
	ServerStatusRunning
	ServerStatusStopping
)

Variables

View Source
var ErrRequestRestart = errors.New("ErrRequestRestart")

Functions

This section is empty.

Types

type Server

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

func NewServer

func NewServer(logger *zap.Logger, fiberConfig fiber.Config, appConfig *config.Config, service service.IService) *Server

func (*Server) DeRegisterConsul

func (s *Server) DeRegisterConsul() error

func (*Server) Finalize

func (s *Server) Finalize()

func (*Server) GetApp

func (s *Server) GetApp() *fiber.App

func (*Server) GetService

func (s *Server) GetService() service.IService

func (*Server) GetStatus

func (s *Server) GetStatus() ServerStatus

func (*Server) GetWebAPIServer

func (s *Server) GetWebAPIServer() *web.WebAPIServer

func (*Server) GetWebConfig

func (s *Server) GetWebConfig() *config.WebServerConfig

func (*Server) HandleSignals

func (s *Server) HandleSignals() error

func (*Server) Initialize

func (s *Server) Initialize(ctx context.Context, options ...ServerOption) error

func (*Server) Listen

func (s *Server) Listen()

func (*Server) RegisterConsul

func (s *Server) RegisterConsul() error

func (*Server) RequestRestartServer

func (s *Server) RequestRestartServer()

func (*Server) RequestShutdownServer

func (s *Server) RequestShutdownServer()

func (*Server) SetStatus

func (s *Server) SetStatus(status ServerStatus)

func (*Server) Shutdown

func (s *Server) Shutdown() error

func (*Server) Start

func (s *Server) Start() error

type ServerOption

type ServerOption func(*Server)

Option is a functional option type that allows us to configure the Server.

type ServerStatus

type ServerStatus int

Jump to

Keyboard shortcuts

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