added Notifier.Close()
This commit is contained in:
		@@ -29,13 +29,16 @@ func (n *Notifier) Notify(collection, type_ string, data []byte) {
 | 
			
		||||
	n.channel <- &Notification{
 | 
			
		||||
		Collection: collection,
 | 
			
		||||
		Type:       type_,
 | 
			
		||||
		Data:data,
 | 
			
		||||
		Data:       data,
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (n *Notifier) Close() {
 | 
			
		||||
	close(n.channel)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type Notification struct {
 | 
			
		||||
	Collection string `json:"collection"`
 | 
			
		||||
	Type       string `json:"type"`
 | 
			
		||||
	Data       []byte `json:"data,omitempty"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user