Remove on the fly stream creation for security reason

This commit is contained in:
Alexey Khit
2023-06-29 22:52:59 +03:00
parent 37abe2ce0d
commit fa8d4e4807
6 changed files with 9 additions and 23 deletions
-14
View File
@@ -53,20 +53,6 @@ func NewTemplate(name string, source any) *Stream {
return New(name, "{input}")
}
func GetOrNew(src string) *Stream {
if stream, ok := streams[src]; ok {
return stream
}
if !HasProducer(src) {
return nil
}
log.Info().Str("url", src).Msg("[streams] create new stream")
return New(src, src)
}
func GetAll() (names []string) {
for name := range streams {
names = append(names, name)