server

package
v0.0.0-...-7dff3de Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseProcess

func CloseProcess() chan os.Signal

CloseProcess closes the os signal process

func IsProcessClosed

func IsProcessClosed(ch <-chan os.Signal) bool

IsProcessClosed checks if the given os signal process is closed

Types

type Config

type Config struct {
	Name                    string        `env:"NAME"`
	Host                    string        `env:"HOST,notEmpty"`
	Port                    int           `env:"PORT,notEmpty"`
	IsProduction            bool          `env:"PRODUCTION"`
	GracefulShutDownTimeout time.Duration `env:"GRACEFUL_SHUTDOWN_TIMEOUT" envDefault:"60s"`
	Logging                 logging.Config
	Tracing                 tracing.Config
	Recover                 recoverhandler.Config
	Secure                  secure.Config
	Acl                     acl.Config
}

type Server

type Server struct {
	Name     string
	Echo     *echo.Echo
	Context  context.Context
	Config   *Config
	EnvFiles []string
}

func New

func New(ctx context.Context, cfg *Config, envFiles []string) *Server

New creates a new server instance

func (*Server) Start

func (server *Server) Start()

Start starting the server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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