feat: add change subscribe

This commit is contained in:
langhuihui
2024-06-13 17:15:30 +08:00
parent 68a7edf678
commit 00b39aee3e
26 changed files with 890 additions and 406 deletions

View File

@@ -332,12 +332,6 @@ func (p *Plugin) Subscribe(streamPath string, options ...any) (subscriber *Subsc
switch v := option.(type) {
case func(*config.Subscribe):
v(&subscriber.Subscribe)
case SubscriberHandler:
defer func() {
if err == nil {
subscriber.Handle(v)
}
}()
}
}
subscriber.Init(p, streamPath, options...)