func (b *Broadcaster) Write(events ...Event) error {
	select {
	case b.events <- events:
	case <-b.closed:
		return ErrSinkClosed
	}
	return nil
}
Write accepts a block of events to be dispatched to all sinks. This method
will never fail and should never block (hopefully!). The caller cedes the
slice memory to the broadcaster and should not modify it after calling
write.
package notifications
import (
	"container/list"
	"fmt"
	"sync"
	"time"
	"github.com/Sirupsen/logrus"
)
type Broadcaster struct {
	sinks  []Sink
	events chan []Event
	closed chan chan struct{}
}
func NewBroadcaster(sinks ...Sink) *Broadcaster {
	b := Broadcaster{
		sinks:  sinks,
		events: make(chan []Event),
		closed: make(chan chan struct{}),
	}
	go b.run()
	return &b
}