public

package
v0.0.0-...-61cbdb0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package public handles the logic of the public facing website

Package public handles the logic of the public facing website

Package public handles the logic of the public facing website

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	DocumentRoot            string
	Port                    int
	GracefulShutdownTimeout time.Duration
	Status                  int
	PublicLogger            *file.Handler
	LoadTimeLogger          *file.Handler
}

func New

func New(dir string, port int) *Controller

New function returns a new PublicWeb type.

func (*Controller) Maintenance

func (con *Controller) Maintenance()

func (*Controller) Restart

func (con *Controller) Restart(graceful bool) error

Restart function combines both the start and stop function, using different status codes, as it is restarting.

func (*Controller) ServeHTTP

func (con *Controller) ServeHTTP(res http.ResponseWriter, req *http.Request)

ServeHTTP function routes all requests for the public web server. It is used in the main function inside of the http.ListenAndServe() function for the public host.

func (*Controller) Start

func (con *Controller) Start() error

Start function starts listening on the public server

func (*Controller) Stop

func (con *Controller) Stop(graceful bool) error

Stop function stops the server gracefully or forceful, depending on the boolean input

Jump to

Keyboard shortcuts

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