mirror of
https://github.com/minio/minio.git
synced 2025-11-22 10:37:42 -05:00
Filesystem goes the high road *again*
This commit is contained in:
@@ -27,7 +27,6 @@ import (
|
||||
"github.com/minio/minio/pkg/iodine"
|
||||
"github.com/minio/minio/pkg/server/httpserver"
|
||||
"github.com/minio/minio/pkg/storage/drivers/donut"
|
||||
fs "github.com/minio/minio/pkg/storage/drivers/fs"
|
||||
"github.com/minio/minio/pkg/storage/drivers/memory"
|
||||
"github.com/minio/minio/pkg/utils/log"
|
||||
)
|
||||
@@ -50,23 +49,6 @@ func (f MemoryFactory) GetStartServerFunc() StartServerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// FilesystemFactory is used to build filesystem api server
|
||||
type FilesystemFactory struct {
|
||||
httpserver.Config
|
||||
Path string
|
||||
}
|
||||
|
||||
// GetStartServerFunc builds memory api server
|
||||
func (f FilesystemFactory) GetStartServerFunc() StartServerFunc {
|
||||
return func() (chan<- string, <-chan error) {
|
||||
driver, _ := fs.NewDriver(f.Path)
|
||||
conf := api.Config{RateLimit: f.RateLimit}
|
||||
conf.SetDriver(driver)
|
||||
ctrl, status, _ := httpserver.Start(api.HTTPHandler(conf), f.Config)
|
||||
return ctrl, status
|
||||
}
|
||||
}
|
||||
|
||||
// WebFactory is used to build web cli server
|
||||
type WebFactory struct {
|
||||
httpserver.Config
|
||||
|
||||
Reference in New Issue
Block a user