func (ch *Channel) Close() error {
	ch.once.Do(func() {
		close(ch.closed)
	})
	return nil
}
Close the channel sink.
package events
import (
	"fmt"
	"sync"
)
type Channel struct {
	C chan Event
	closed chan struct{}
	once   sync.Once
}
func NewChannel(buffer int) *Channel {
	return &Channel{
		C:      make(chan Event, buffer),
		closed: make(chan struct{}),
	}
}
func (ch *Channel) Done() chan struct{} {
	return ch.closed
}
func (ch *Channel) Write(event Event) error {
	select {
	case ch.C <- event:
		return nil
	case <-ch.closed:
		return ErrSinkClosed
	}
}