mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Move fedclient interface over to gmsl (#3061)
Companion PR: https://github.com/matrix-org/gomatrixserverlib/pull/366
This commit is contained in:
parent
4679098a64
commit
ed19efc5d7
34 changed files with 53 additions and 120 deletions
|
@ -28,7 +28,6 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
"go.uber.org/atomic"
|
||||
|
||||
fedapi "github.com/matrix-org/dendrite/federationapi/api"
|
||||
"github.com/matrix-org/dendrite/federationapi/statistics"
|
||||
"github.com/matrix-org/dendrite/federationapi/storage"
|
||||
"github.com/matrix-org/dendrite/federationapi/storage/shared/receipt"
|
||||
|
@ -54,7 +53,7 @@ type destinationQueue struct {
|
|||
process *process.ProcessContext
|
||||
signing map[spec.ServerName]*fclient.SigningIdentity
|
||||
rsAPI api.FederationRoomserverAPI
|
||||
client fedapi.FederationClient // federation client
|
||||
client fclient.FederationClient // federation client
|
||||
origin spec.ServerName // origin of requests
|
||||
destination spec.ServerName // destination of requests
|
||||
running atomic.Bool // is the queue worker running?
|
||||
|
|
|
@ -29,7 +29,6 @@ import (
|
|||
log "github.com/sirupsen/logrus"
|
||||
"github.com/tidwall/gjson"
|
||||
|
||||
fedapi "github.com/matrix-org/dendrite/federationapi/api"
|
||||
"github.com/matrix-org/dendrite/federationapi/statistics"
|
||||
"github.com/matrix-org/dendrite/federationapi/storage"
|
||||
"github.com/matrix-org/dendrite/federationapi/storage/shared/receipt"
|
||||
|
@ -45,7 +44,7 @@ type OutgoingQueues struct {
|
|||
disabled bool
|
||||
rsAPI api.FederationRoomserverAPI
|
||||
origin spec.ServerName
|
||||
client fedapi.FederationClient
|
||||
client fclient.FederationClient
|
||||
statistics *statistics.Statistics
|
||||
signing map[spec.ServerName]*fclient.SigningIdentity
|
||||
queuesMutex sync.Mutex // protects the below
|
||||
|
@ -89,7 +88,7 @@ func NewOutgoingQueues(
|
|||
process *process.ProcessContext,
|
||||
disabled bool,
|
||||
origin spec.ServerName,
|
||||
client fedapi.FederationClient,
|
||||
client fclient.FederationClient,
|
||||
rsAPI api.FederationRoomserverAPI,
|
||||
statistics *statistics.Statistics,
|
||||
signing []*fclient.SigningIdentity,
|
||||
|
|
|
@ -32,7 +32,6 @@ import (
|
|||
"github.com/matrix-org/gomatrixserverlib"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/matrix-org/dendrite/federationapi/api"
|
||||
"github.com/matrix-org/dendrite/federationapi/statistics"
|
||||
"github.com/matrix-org/dendrite/federationapi/storage"
|
||||
rsapi "github.com/matrix-org/dendrite/roomserver/api"
|
||||
|
@ -75,7 +74,7 @@ func (r *stubFederationRoomServerAPI) QueryServerBannedFromRoom(ctx context.Cont
|
|||
}
|
||||
|
||||
type stubFederationClient struct {
|
||||
api.FederationClient
|
||||
fclient.FederationClient
|
||||
shouldTxSucceed bool
|
||||
shouldTxRelaySucceed bool
|
||||
txCount atomic.Uint32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue