github.com/sixexorg/magnetic-ring@v0.0.0-20191119090307-31705a21e419/setup/external_interaction.go (about) 1 package setup 2 3 import ( 4 "fmt" 5 6 "github.com/sixexorg/magnetic-ring/bactor" 7 "github.com/sixexorg/magnetic-ring/http/actor" 8 "github.com/sixexorg/magnetic-ring/http/router" 9 ) 10 11 func runRouter(httpPort int) { 12 router.StartRouter() 13 engin := router.GetRouter() 14 txPoolActor, err := bactor.GetActorPid(bactor.TXPOOLACTOR) 15 if err != nil { 16 panic(err) 17 } 18 httpactor.SetTxPoolPid(txPoolActor) 19 addr := fmt.Sprintf(":%d", httpPort) 20 engin.Run(addr) 21 }