owncast-webhook/internal/test/fake.go
Simon Vieille 68c05816dd
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
feat(chat): add effect and improve faker
2025-09-07 20:14:05 +02:00

21 lines
455 B
Go

package test
import (
"math/rand"
"time"
"gitnet.fr/deblan/owncast-webhook/internal/store"
)
func GenerateFakeMessages() {
go func() {
for i := 0; i < 10; i++ {
store.GetMessageStore().Add(store.TestMessage{})
time.Sleep(time.Duration(rand.Intn(3000-100)+100) * time.Millisecond)
}
// for {
// store.GetMessageStore().Add(store.TestMessage{})
// time.Sleep(time.Duration(rand.Intn(3000-100)+100) * time.Millisecond)
// }
}()
}