mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Adding initial web server and storage server module infrastructure
This commit is contained in:
@@ -1 +1,33 @@
|
||||
package storage
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
func GetHttpHandler() http.Handler {
|
||||
mux := mux.NewRouter()
|
||||
mux.HandleFunc("/", storageHandler)
|
||||
return mux
|
||||
}
|
||||
|
||||
func storageHandler(w http.ResponseWriter, req *http.Request) {
|
||||
io.WriteString(w, "MINIO")
|
||||
}
|
||||
|
||||
func Start() (chan<- string, <-chan error) {
|
||||
ctrlChannel := make(chan string)
|
||||
errorChannel := make(chan error)
|
||||
go start(ctrlChannel, errorChannel)
|
||||
return ctrlChannel, errorChannel
|
||||
}
|
||||
|
||||
func start(ctrlChannel <-chan string, errorChannel chan<- error) {
|
||||
errorChannel <- errors.New("STORAGE MSG")
|
||||
errorChannel <- errors.New("STORAGE MSG")
|
||||
errorChannel <- errors.New("STORAGE MSG")
|
||||
close(errorChannel)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user