launcherserver

package
v0.0.0-...-b1f961f Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Logger                   *zap.Logger
	DB                       *sqlx.DB
	ErupeConfig              *config.Config
	UseOriginalLauncherFiles bool
}

Config struct allows configuring the server.

type Server

type Server struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Server is the MHF launcher HTTP server.

func NewServer

func NewServer(config *Config) *Server

NewServer creates a new Server type.

func (*Server) Shutdown

func (s *Server) Shutdown()

Shutdown exits the server gracefully.

func (*Server) Start

func (s *Server) Start() error

Start starts the server in a new goroutine.

type ServerHandler

type ServerHandler func(*Server, http.ResponseWriter, *http.Request)

ServerHandler is a handler function akin to http.Handler's ServeHTTP, but has an additional *Server argument.

type ServerHandlerFunc

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

ServerHandlerFunc is a small type that implements http.Handler and wraps a calling ServerHandler with a *Server argument.

func (ServerHandlerFunc) ServeHTTP

func (shf ServerHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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