mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Restructure API handlers, add JSON RPC simple HelloService right now.
This commit is contained in:
17
main.go
17
main.go
@@ -26,7 +26,6 @@ import (
|
||||
|
||||
"github.com/dustin/go-humanize"
|
||||
"github.com/minio/cli"
|
||||
"github.com/minio/minio/pkg/api"
|
||||
"github.com/minio/minio/pkg/iodine"
|
||||
)
|
||||
|
||||
@@ -71,22 +70,6 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func getAPIServerConfig(c *cli.Context) api.Config {
|
||||
certFile := c.GlobalString("cert")
|
||||
keyFile := c.GlobalString("key")
|
||||
if (certFile != "" && keyFile == "") || (certFile == "" && keyFile != "") {
|
||||
Fatalln("Both certificate and key are required to enable https.")
|
||||
}
|
||||
tls := (certFile != "" && keyFile != "")
|
||||
return api.Config{
|
||||
Address: c.GlobalString("address"),
|
||||
TLS: tls,
|
||||
CertFile: certFile,
|
||||
KeyFile: keyFile,
|
||||
RateLimit: c.GlobalInt("ratelimit"),
|
||||
}
|
||||
}
|
||||
|
||||
// Tries to get os/arch/platform specific information
|
||||
// Returns a map of current os/arch/platform/memstats
|
||||
func getSystemData() map[string]string {
|
||||
|
||||
Reference in New Issue
Block a user