1 package events 2 3 // Event marks items that can be sent as events. 4 type Event interface{} 5 6 // Sink accepts and sends events. 7 type Sink interface { 8 // Write an event to the Sink. If no error is returned, the caller will 9 // assume that all events have been committed to the sink. If an error is 10 // received, the caller may retry sending the event. 11 Write(event Event) error 12 13 // Close the sink, possibly waiting for pending events to flush. 14 Close() error 15 } 16