func (s *nonBlockingSubscriber) Ch() <-chan Message {
	return s.ch
}
Ch return the channel used by subscriptions to consume messages.
package hub
import (
	"sync"
)
type (
	alertFunc func(missed int)
	nonBlockingSubscriber struct {
		ch        chan Message
		alert     alertFunc
		onceClose sync.Once
	}
	blockingSubscriber struct {
		ch        chan Message
		onceClose sync.Once
	}
)
func newNonBlockingSubscriber(cap int, alerter alertFunc) *nonBlockingSubscriber {
	if cap <= 0 {
		cap = 10
	}
	return &nonBlockingSubscriber{
		ch:    make(chan Message, cap),
		alert: alerter,
	}
}
func (s *nonBlockingSubscriber) Set(msg Message) {
	select {
	case s.ch <- msg:
	default:
		s.alert(1)
	}
}