Subscription represents a stream of user-related events.
| 111 | |
| 112 | // Subscription represents a stream of user-related events. |
| 113 | type Subscription struct { |
| 114 | service *EventService // service subscription was created from |
| 115 | userID int // subscribed user |
| 116 | |
| 117 | c chan wtf.Event // channel of events |
| 118 | once sync.Once // ensures c only closed once |
| 119 | } |
| 120 | |
| 121 | // Close disconnects the subscription from the service it was created from. |
| 122 | func (s *Subscription) Close() error { |
nothing calls this directly
no outgoing calls
no test coverage detected