mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Remove needless storage interface, add comments
This commit is contained in:
parent
ad607f29a6
commit
0ced974131
|
|
@ -8,7 +8,10 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
FederationSenderPerformJoinRequestPath = "/api/federationsender/performJoinRequest"
|
||||
// FederationSenderPerformJoinRequestPath is the HTTP path for the PerformJoinRequest API.
|
||||
FederationSenderPerformJoinRequestPath = "/api/federationsender/performJoinRequest"
|
||||
|
||||
// FederationSenderPerformLeaveRequestPath is the HTTP path for the PerformLeaveRequest API.
|
||||
FederationSenderPerformLeaveRequestPath = "/api/federationsender/performLeaveRequest"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,28 +1,20 @@
|
|||
package query
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/matrix-org/dendrite/common"
|
||||
"github.com/matrix-org/dendrite/federationsender/api"
|
||||
"github.com/matrix-org/dendrite/federationsender/types"
|
||||
"github.com/matrix-org/dendrite/federationsender/storage"
|
||||
rsAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||
"github.com/matrix-org/util"
|
||||
)
|
||||
|
||||
// FederationSenderQueryDatabase has the APIs needed to implement the query API.
|
||||
type FederationSenderQueryDatabase interface {
|
||||
GetJoinedHosts(
|
||||
ctx context.Context, roomID string,
|
||||
) ([]types.JoinedHost, error)
|
||||
}
|
||||
|
||||
// FederationSenderInternalAPI is an implementation of api.FederationSenderInternalAPI
|
||||
type FederationSenderInternalAPI struct {
|
||||
api.FederationSenderInternalAPI
|
||||
DB FederationSenderQueryDatabase
|
||||
DB storage.Database
|
||||
RoomserverInputAPI rsAPI.RoomserverInputAPI
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue