mirror of
https://github.com/LBRYFoundation/reflector.go.git
synced 2025-08-28 16:01:31 +00:00
also run peer server on reflector
This commit is contained in:
parent
5baa66f0aa
commit
609ebdb74e
1 changed files with 8 additions and 0 deletions
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
"github.com/lbryio/reflector.go/db"
|
"github.com/lbryio/reflector.go/db"
|
||||||
"github.com/lbryio/reflector.go/meta"
|
"github.com/lbryio/reflector.go/meta"
|
||||||
|
"github.com/lbryio/reflector.go/peer"
|
||||||
"github.com/lbryio/reflector.go/reflector"
|
"github.com/lbryio/reflector.go/reflector"
|
||||||
"github.com/lbryio/reflector.go/store"
|
"github.com/lbryio/reflector.go/store"
|
||||||
|
|
||||||
|
@ -49,8 +50,15 @@ func reflectorCmd(cmd *cobra.Command, args []string) {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
peerServer := peer.NewServer(combo)
|
||||||
|
err = peerServer.Start(":5567")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
interruptChan := make(chan os.Signal, 1)
|
interruptChan := make(chan os.Signal, 1)
|
||||||
signal.Notify(interruptChan, os.Interrupt, syscall.SIGTERM)
|
signal.Notify(interruptChan, os.Interrupt, syscall.SIGTERM)
|
||||||
<-interruptChan
|
<-interruptChan
|
||||||
|
peerServer.Shutdown()
|
||||||
reflectorServer.Shutdown()
|
reflectorServer.Shutdown()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue