()
| 105 | var Streams util.Map[string, *Stream] |
| 106 | |
| 107 | func FilterStreams[T IPublisher]() (ss []*Stream) { |
| 108 | Streams.Range(func(_ string, s *Stream) { |
| 109 | if _, ok := s.Publisher.(T); ok { |
| 110 | ss = append(ss, s) |
| 111 | } |
| 112 | }) |
| 113 | return |
| 114 | } |
| 115 | |
| 116 | type StreamTimeoutConfig struct { |
| 117 | PublishTimeout time.Duration //发布者无数据后超时 |