terraform deploy on ECS (#27)

This commit is contained in:
David Zhao
2021-02-28 22:28:17 -08:00
committed by GitHub
parent 7b93e661f0
commit f7af7607b9
17 changed files with 444 additions and 21 deletions
+5
View File
@@ -59,6 +59,7 @@ func NewLivekitServer(conf *config.Config,
mux := http.NewServeMux()
mux.Handle(s.roomServer.PathPrefix(), s.roomServer)
mux.Handle("/rtc", rtcService)
mux.HandleFunc("/", s.healthCheck)
s.httpServer = &http.Server{
Addr: fmt.Sprintf(":%d", conf.Port),
@@ -141,6 +142,10 @@ func (s *LivekitServer) Stop() {
}
}
func (s *LivekitServer) healthCheck(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
}
// worker to perform periodic tasks per node
func (s *LivekitServer) backgroundWorker() {
roomTicker := time.NewTicker(30 * time.Second)