code: func (pm *Manager) SubscribeEvents(buffer int, watchEvents ...Event) (eventCh <-chan interface{}, cancel func()) {
  	topic := func(i interface{}) bool {
  		observed, ok := i.(Event)
  		if !ok {
  			panic(fmt.Sprintf("unexpected type passed to event channel: %v", reflect.TypeOf(i)))
  		}
  		for _, e := range watchEvents {
  			if e.matches(observed) {
  				return true
  			}
  		}
  		// If no specific events are specified always assume a matched event
  		// If some events were specified and none matched above, then the event
  		// doesn't match
  		return watchEvents == nil
  	}
  	ch := pm.publisher.SubscribeTopicWithBuffer(topic, buffer)
  	cancelFunc := func() { pm.publisher.Evict(ch) }
  	return ch, cancelFunc
  }
docs: // SubscribeEvents provides an event channel to listen for structured events from
  // the plugin manager actions, CRUD operations.
  // The caller must call the returned `cancel()` function once done with the channel
  // or this will leak resources.