Restructure API handlers, add JSON RPC simple HelloService right now.

This commit is contained in:
Harshavardhana
2015-06-30 20:15:48 -07:00
parent 335c7827eb
commit 4addf7a996
24 changed files with 273 additions and 294 deletions

17
main.go
View File

@@ -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 {