mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-25 07:03:48 +01:00
Add cmd line option to pinecone demo for enabling relaying
This commit is contained in:
parent
0f998e3af3
commit
f98003c030
1 changed files with 8 additions and 6 deletions
|
@ -69,6 +69,7 @@ var (
|
|||
instancePeer = flag.String("peer", "", "the static Pinecone peers to connect to, comma separated-list")
|
||||
instanceListen = flag.String("listen", ":0", "the port Pinecone peers can connect to")
|
||||
instanceDir = flag.String("dir", ".", "the directory to store the databases in (if --config not specified)")
|
||||
instanceRelayingEnabled = flag.Bool("relay", false, "whether to enable store & forward relaying for other nodes")
|
||||
)
|
||||
|
||||
const relayServerRetryInterval = time.Second * 30
|
||||
|
@ -244,7 +245,8 @@ func main() {
|
|||
Config: &base.Cfg.FederationAPI,
|
||||
UserAPI: userAPI,
|
||||
}
|
||||
relayAPI := relayapi.NewRelayInternalAPI(base, federation, rsAPI, keyRing, producer, true)
|
||||
relayAPI := relayapi.NewRelayInternalAPI(base, federation, rsAPI, keyRing, producer, *instanceRelayingEnabled)
|
||||
logrus.Infof("Relaying enabled: %v", relayAPI.RelayingEnabled())
|
||||
|
||||
monolith := setup.Monolith{
|
||||
Config: base.Cfg,
|
||||
|
|
Loading…
Reference in a new issue