amazon events published as server side event
This commit is contained in:
@@ -124,6 +124,14 @@ func (q *Queue) Send(ctx context.Context, e Event) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func StandardEvent(acctID int64, eventType string) Event {
|
||||
return Event{
|
||||
AccountID: acctID,
|
||||
Type: eventType,
|
||||
Data: []byte(fmt.Sprintf(`{"eventType": %q}`, eventType)),
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Event) Write(w http.ResponseWriter) {
|
||||
fmt.Fprintf(
|
||||
w,
|
||||
|
||||
Reference in New Issue
Block a user