Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventToBytes ¶
Types ¶
type BasicEvent ¶
type BasicEvent struct {
// contains filtered or unexported fields
}
func (BasicEvent) Data ¶
func (e BasicEvent) Data() string
func (BasicEvent) Event ¶
func (e BasicEvent) Event() string
func (BasicEvent) ID ¶
func (e BasicEvent) ID() string
type EventBroker ¶
type EventBroker struct {
// contains filtered or unexported fields
}
func NewBroker ¶
func NewBroker() *EventBroker
func StartNewBroker ¶
func StartNewBroker() *EventBroker
func (*EventBroker) SendEvent ¶
func (b *EventBroker) SendEvent(event Event)
func (*EventBroker) Start ¶
func (b *EventBroker) Start()
func (*EventBroker) Stop ¶
func (b *EventBroker) Stop()
func (*EventBroker) Subscribe ¶
func (b *EventBroker) Subscribe(stream *EventStream)
func (*EventBroker) Unsubscribe ¶
func (b *EventBroker) Unsubscribe(stream *EventStream)
type EventStream ¶
type EventStream struct {
// contains filtered or unexported fields
}
func NewEventStream ¶
func NewEventStream(w http.ResponseWriter) (*EventStream, error)
func StartNewEventStream ¶
func StartNewEventStream(w http.ResponseWriter) (*EventStream, error)
func (*EventStream) CloseNotify ¶
func (es *EventStream) CloseNotify() <-chan bool
func (*EventStream) SendEvent ¶
func (es *EventStream) SendEvent(event Event)
func (*EventStream) Start ¶
func (es *EventStream) Start()
func (*EventStream) Stop ¶
func (es *EventStream) Stop()
type EventWriter ¶
type EventWriter interface { http.ResponseWriter http.Flusher http.CloseNotifier }
type TestStream ¶
type TestStream struct {
// contains filtered or unexported fields
}
func NewTestStream ¶
func NewTestStream(start bool) (*TestStream, error)
func (*TestStream) CloseRecorder ¶
func (t *TestStream) CloseRecorder()
func (*TestStream) EventStream ¶
func (t *TestStream) EventStream() *EventStream
func (*TestStream) Received ¶
func (t *TestStream) Received(event Event) bool
Source Files ¶
Click to show internal directories.
Click to hide internal directories.