mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 15:03:09 -06:00
comments
This commit is contained in:
parent
0eceb3bcd7
commit
735d477ad2
|
|
@ -47,6 +47,7 @@ type Consumer struct {
|
||||||
ErrorLogger ErrorLogger
|
ErrorLogger ErrorLogger
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WriteOutputRoomEvent implements OutputRoomEventWriter
|
||||||
func (c *Consumer) WriteOutputRoomEvent(output api.OutputRoomEvent) error {
|
func (c *Consumer) WriteOutputRoomEvent(output api.OutputRoomEvent) error {
|
||||||
var m sarama.ProducerMessage
|
var m sarama.ProducerMessage
|
||||||
value, err := json.Marshal(output)
|
value, err := json.Marshal(output)
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,9 @@ type RoomEventDatabase interface {
|
||||||
GetLatestEventsForUpdate(roomNID types.RoomNID) ([]types.StateAtEventAndReference, string, types.RoomRecentEventsUpdater, error)
|
GetLatestEventsForUpdate(roomNID types.RoomNID) ([]types.StateAtEventAndReference, string, types.RoomRecentEventsUpdater, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OutputRoomEventWriter has the APIs needed to write an event to the output logs.
|
||||||
type OutputRoomEventWriter interface {
|
type OutputRoomEventWriter interface {
|
||||||
|
// Write an event.
|
||||||
WriteOutputRoomEvent(output api.OutputRoomEvent) error
|
WriteOutputRoomEvent(output api.OutputRoomEvent) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue