mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
Filesystem goes the high road *again*
This commit is contained in:
33
commands.go
33
commands.go
@@ -27,7 +27,6 @@ var commands = []cli.Command{
|
||||
|
||||
var modeCommands = []cli.Command{
|
||||
memoryCmd,
|
||||
fsCmd,
|
||||
donutCmd,
|
||||
}
|
||||
|
||||
@@ -56,23 +55,6 @@ EXAMPLES:
|
||||
`,
|
||||
}
|
||||
|
||||
var fsCmd = cli.Command{
|
||||
Name: "fs",
|
||||
Description: "Path to filesystem volume.",
|
||||
Action: runFilesystem,
|
||||
CustomHelpTemplate: `NAME:
|
||||
minio mode {{.Name}} - {{.Description}}
|
||||
|
||||
USAGE:
|
||||
minio mode {{.Name}} limit SIZE expire TIME
|
||||
|
||||
EXAMPLES:
|
||||
1. Export an existing filesystem path
|
||||
$ minio mode {{.Name}} /var/www
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
var donutCmd = cli.Command{
|
||||
Name: "donut",
|
||||
Description: "[status: EXPERIMENTAL]. Path to donut volume.",
|
||||
@@ -250,18 +232,3 @@ func runDonut(c *cli.Context) {
|
||||
servers := []server.StartServerFunc{apiServer} //, webServer}
|
||||
server.StartMinio(servers)
|
||||
}
|
||||
|
||||
func runFilesystem(c *cli.Context) {
|
||||
if len(c.Args()) != 1 {
|
||||
cli.ShowCommandHelpAndExit(c, "fs", 1) // last argument is exit code
|
||||
}
|
||||
apiServerConfig := getAPIServerConfig(c)
|
||||
fsDriver := server.FilesystemFactory{
|
||||
Config: apiServerConfig,
|
||||
Path: c.Args()[0],
|
||||
}
|
||||
apiServer := fsDriver.GetStartServerFunc()
|
||||
// webServer := getWebServerConfigFunc(c)
|
||||
servers := []server.StartServerFunc{apiServer} //, webServer}
|
||||
server.StartMinio(servers)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user