Пример #1
0
// startController starts a minio controller
func startController(conf minioConfig) *probe.Error {
	rpcServer, err := configureControllerRPC(conf, getControllerRPCHandler(conf.Anonymous))
	if err != nil {
		return err.Trace()
	}
	// Setting rate limit to 'zero' no ratelimiting implemented
	if err := minhttp.ListenAndServeLimited(0, rpcServer); err != nil {
		return err.Trace()
	}
	return nil
}
Пример #2
0
// Start starts a controller
func Start() *probe.Error {
	rpcServer, err := getRPCServer(getRPCHandler())
	if err != nil {
		return err.Trace()
	}
	// Setting rate limit to 'zero' no ratelimiting implemented
	if err := minhttp.ListenAndServeLimited(0, rpcServer); err != nil {
		return err.Trace()
	}
	return nil
}
Пример #3
0
// Start starts a s3 compatible cloud storage server
func Start(conf api.Config) *probe.Error {
	apiHandler, minioAPI := getAPIHandler(conf)
	apiServer, err := getAPIServer(conf, apiHandler)
	if err != nil {
		return err.Trace()
	}
	// start ticket master
	go startTM(minioAPI)
	if err := minhttp.ListenAndServeLimited(conf.RateLimit, apiServer); err != nil {
		return err.Trace()
	}
	return nil
}