mirror of
https://github.com/pgsty/minio.git
synced 2026-07-23 06:00:24 +03:00
Add cache, donut tests separately - fix behavior differences
Remove priority queue, implement it using a simpler channels
This commit is contained in:
@@ -101,14 +101,14 @@ func registerRPC(mux *router.Router, s *rpc.Server) http.Handler {
|
||||
return mux
|
||||
}
|
||||
|
||||
// APIHandler api handler
|
||||
func APIHandler(conf api.Config) http.Handler {
|
||||
// getAPIHandler api handler
|
||||
func getAPIHandler(conf api.Config) http.Handler {
|
||||
mux := router.NewRouter()
|
||||
return registerOtherMiddleware(registerAPI(mux), conf)
|
||||
}
|
||||
|
||||
// RPCHandler rpc handler
|
||||
func RPCHandler() http.Handler {
|
||||
// getRPCHandler rpc handler
|
||||
func getRPCHandler() http.Handler {
|
||||
s := rpc.NewServer()
|
||||
s.RegisterJSONCodec()
|
||||
s.RegisterService(new(rpc.HelloService), "")
|
||||
|
||||
@@ -31,7 +31,7 @@ func startAPI(errCh chan error, conf api.Config) {
|
||||
// Minio server config
|
||||
httpServer := &http.Server{
|
||||
Addr: conf.Address,
|
||||
Handler: APIHandler(conf),
|
||||
Handler: getAPIHandler(conf),
|
||||
MaxHeaderBytes: 1 << 20,
|
||||
}
|
||||
|
||||
@@ -77,16 +77,19 @@ func startAPI(errCh chan error, conf api.Config) {
|
||||
func startRPC(errCh chan error) {
|
||||
defer close(errCh)
|
||||
|
||||
rpcHandler := RPCHandler()
|
||||
// Minio server config
|
||||
httpServer := &http.Server{
|
||||
Addr: "127.0.0.1:9001", // TODO make this configurable
|
||||
Handler: rpcHandler,
|
||||
Handler: getRPCHandler(),
|
||||
MaxHeaderBytes: 1 << 20,
|
||||
}
|
||||
errCh <- httpServer.ListenAndServe()
|
||||
}
|
||||
|
||||
func startTM(errCh chan error) {
|
||||
defer close(errCh)
|
||||
}
|
||||
|
||||
// StartServices starts basic services for a server
|
||||
func StartServices(conf api.Config) error {
|
||||
apiErrCh := make(chan error)
|
||||
|
||||
Reference in New Issue
Block a user