👌 IMPROVE: 新增流关闭理由

This commit is contained in:
dexter
2022-09-04 12:51:34 +08:00
parent 51e002621b
commit 0018e194f1
4 changed files with 34 additions and 13 deletions

5
io.go
View File

@@ -71,7 +71,9 @@ func (i *IO[C]) OnEvent(event any) {
}
}
}
func (io *IO[C]) GetStream() *Stream {
return io.Stream
}
func (io *IO[C]) GetIO() *IO[C] {
return io
}
@@ -86,6 +88,7 @@ type IIO interface {
Stop()
SetIO(any)
SetParentCtx(context.Context)
GetStream() *Stream
}
//Stop 停止订阅或者发布,由订阅者或者发布者调用