Documentation
¶
Overview ¶
Package app contains the main Application struct. This struct represents the application and is resposible for creating and connecting all other parts of the software.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoRedirects = fmt.Errorf("No redirects")
Used to stop following redirects with the default http.Client
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is the type which represents the webserver. It is responsible for parsing the config and it has Start, Stop, Reload and Wait functions.
func (*Application) Reload ¶
func (a *Application) Reload(cfg *config.Config) error
Reload takse a new configuration and replaces the old one with it. After succesful reload the things that are written in the new config will be in use.
func (*Application) Stop ¶
func (a *Application) Stop() error
Stop makes sure the application is completely stopped and all of its goroutines and channels are finished and closed.
func (*Application) Wait ¶
func (a *Application) Wait() error
Wait subscribes iteself to few signals and waits for any of them to be received. When Wait returns it is the end of the application.
type VirtualHost ¶
type VirtualHost struct { config.VirtualHost CacheManger cache.CacheManager Storage storage.Storage }
Links a config vritual host to its cache manager and a storage object.