This commit is contained in:
langhuihui
2024-04-25 20:28:28 +08:00
parent d76d69b327
commit fdcc85d932
28 changed files with 834 additions and 346 deletions

View File

@@ -2,6 +2,7 @@ package main
import (
"context"
"flag"
"time"
"m7s.live/m7s/v5"
@@ -12,8 +13,12 @@ import (
func main() {
ctx := context.Background()
// ctx, _ := context.WithDeadline(context.Background(), time.Now().Add(time.Second*100))
go m7s.Run(ctx, "config1.yaml")
var multi bool
flag.BoolVar(&multi, "multi", false, "debug")
flag.Parse()
if multi {
go m7s.Run(ctx, "config1.yaml")
}
time.Sleep(time.Second)
m7s.NewServer().Run(ctx, "config2.yaml")
}