mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 04:30:26 +03:00
Get rid of sub-domain code and some other formatting changes
This commit is contained in:
@@ -24,12 +24,10 @@ import (
|
||||
|
||||
// Config - http server config
|
||||
type Config struct {
|
||||
Address string
|
||||
TLS bool
|
||||
CertFile string
|
||||
KeyFile string
|
||||
Websocket bool // TODO
|
||||
// Domain string
|
||||
Address string
|
||||
TLS bool
|
||||
CertFile string
|
||||
KeyFile string
|
||||
}
|
||||
|
||||
// Server - http server related
|
||||
@@ -59,11 +57,12 @@ func start(ctrlChannel <-chan string, errorChannel chan<- error,
|
||||
}
|
||||
log.Println("Starting HTTP Server on:", config.Address)
|
||||
|
||||
if config.TLS {
|
||||
switch {
|
||||
default:
|
||||
err = httpServer.ListenAndServe()
|
||||
case config.TLS == true:
|
||||
httpServer.TLSConfig = getDefaultTLSConfig()
|
||||
err = httpServer.ListenAndServeTLS(config.CertFile, config.KeyFile)
|
||||
} else {
|
||||
err = httpServer.ListenAndServe()
|
||||
}
|
||||
errorChannel <- err
|
||||
close(errorChannel)
|
||||
|
||||
@@ -42,8 +42,7 @@ type MemoryFactory struct {
|
||||
func (f MemoryFactory) GetStartServerFunc() StartServerFunc {
|
||||
return func() (chan<- string, <-chan error) {
|
||||
_, _, driver := memory.Start(f.MaxMemory, f.Expiration)
|
||||
//ctrl, status, _ := httpserver.Start(api.HTTPHandler(f.Domain, driver), f.Config)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler("", driver), f.Config)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler(driver), f.Config)
|
||||
return ctrl, status
|
||||
}
|
||||
}
|
||||
@@ -71,7 +70,7 @@ type DonutFactory struct {
|
||||
func (f DonutFactory) GetStartServerFunc() StartServerFunc {
|
||||
return func() (chan<- string, <-chan error) {
|
||||
_, _, driver := donut.Start(f.Paths)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler("", driver), f.Config)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler(driver), f.Config)
|
||||
return ctrl, status
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user