diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-11-02 11:18:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-02 10:18:11 +0000 |
commit | 86b25a6337b1ef99125b662feb9adcd3703b8f73 (patch) | |
tree | 0c6429a6943f92e59a5b14a4c317eb2c2bb4e97d /userapi/storage/interface.go | |
parent | b367cfeddf89456e7d067df8262ff5579fcbb9a1 (diff) |
Add message stats to reporting (#2748)
Since we're now listening on the `OutputRoomEvent` stream, we are able
to store messages stats.
Diffstat (limited to 'userapi/storage/interface.go')
-rw-r--r-- | userapi/storage/interface.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/userapi/storage/interface.go b/userapi/storage/interface.go index fb12b53a..28ef2655 100644 --- a/userapi/storage/interface.go +++ b/userapi/storage/interface.go @@ -19,6 +19,8 @@ import ( "encoding/json" "errors" + "github.com/matrix-org/gomatrixserverlib" + "github.com/matrix-org/dendrite/clientapi/auth/authtypes" "github.com/matrix-org/dendrite/internal/pushrules" "github.com/matrix-org/dendrite/userapi/api" @@ -144,6 +146,8 @@ type Database interface { type Statistics interface { UserStatistics(ctx context.Context) (*types.UserStatistics, *types.DatabaseEngine, error) + DailyRoomsMessages(ctx context.Context, serverName gomatrixserverlib.ServerName) (stats types.MessageStats, activeRooms, activeE2EERooms int64, err error) + UpsertDailyRoomsMessages(ctx context.Context, serverName gomatrixserverlib.ServerName, stats types.MessageStats, activeRooms, activeE2EERooms int64) error } // Err3PIDInUse is the error returned when trying to save an association involving |