mirror of
https://github.com/element-hq/dendrite.git
synced 2025-09-13 21:02:25 +03:00
Add pinecone demo toggle for dis/enabling relaying for other nodes
This commit is contained in:
parent
63df85db6d
commit
0f998e3af3
13 changed files with 119 additions and 25 deletions
|
@ -24,6 +24,20 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// SetRelayingEnabled implements api.RelayInternalAPI
|
||||
func (r *RelayInternalAPI) SetRelayingEnabled(enabled bool) {
|
||||
r.relayingEnabledMutex.Lock()
|
||||
defer r.relayingEnabledMutex.Unlock()
|
||||
r.relayingEnabled = enabled
|
||||
}
|
||||
|
||||
// RelayingEnabled implements api.RelayInternalAPI
|
||||
func (r *RelayInternalAPI) RelayingEnabled() bool {
|
||||
r.relayingEnabledMutex.Lock()
|
||||
defer r.relayingEnabledMutex.Unlock()
|
||||
return r.relayingEnabled
|
||||
}
|
||||
|
||||
// PerformRelayServerSync implements api.RelayInternalAPI
|
||||
func (r *RelayInternalAPI) PerformRelayServerSync(
|
||||
ctx context.Context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue