server

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpServer

func NewHttpServer(port int, m *manager.Manager) *httpServer

Types

type Server

type Server struct {
	Http internalModels.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(conf *ServerConfig, m *manager.Manager) *Server

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

func (*Server) Stop

func (s *Server) Stop()

func (*Server) WaitStop

func (s *Server) WaitStop()

type ServerConfig added in v0.2.0

type ServerConfig struct {
	Hostname string `env:"HOSTNAME,required"`
	Http     struct {
		Enabled bool `env:"HTTP_ENABLED,default=True"`
		Port    int  `env:"HTTP_PORT,default=8080"`
	}
}

func ParseServerConfiguration added in v0.2.0

func ParseServerConfiguration(ctx context.Context) *ServerConfig

Jump to

Keyboard shortcuts

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