发布者或者订阅者的共用结构体
| 37 | |
| 38 | // 发布者或者订阅者的共用结构体 |
| 39 | type IO struct { |
| 40 | ID string |
| 41 | Type string |
| 42 | RemoteAddr string |
| 43 | context.Context `json:"-" yaml:"-"` //不要直接设置,应当通过SetParentCtx传入父级Context |
| 44 | context.CancelCauseFunc `json:"-" yaml:"-"` //流关闭是关闭发布者或者订阅者 |
| 45 | *log.Logger `json:"-" yaml:"-"` |
| 46 | StartTime time.Time //创建时间 |
| 47 | Stream *Stream `json:"-" yaml:"-"` |
| 48 | io.Reader `json:"-" yaml:"-"` |
| 49 | io.Writer `json:"-" yaml:"-"` |
| 50 | io.Closer `json:"-" yaml:"-"` |
| 51 | Args url.Values |
| 52 | Spesific common.IIO `json:"-" yaml:"-"` |
| 53 | } |
| 54 | |
| 55 | func (io *IO) GetStream() common.IStream { |
| 56 | return io.Stream |
nothing calls this directly
no outgoing calls
no test coverage detected