hello: Invohe RunHello

This commit is contained in:
Łukasz Magiera
2019-07-03 19:41:54 +02:00
parent fdde4db217
commit 2b906efa1e
6 changed files with 13 additions and 4 deletions
+1
View File
@@ -73,6 +73,7 @@ func New(ctx context.Context) (api.API, error) {
fx.Invoke(
lp2p.PstoreAddSelfKeys,
lp2p.StartListening(defaultListenAddrs),
modules.RunHello,
),
),
+2 -1
View File
@@ -15,6 +15,7 @@ import (
)
const ProtocolID = "/fil/hello/1.0.0"
var log = logging.Logger("hello")
func init() {
@@ -96,4 +97,4 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error {
}*/
return nil
}
}
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"go.uber.org/fx"
)
func HandleHello(mctx helpers.MetricsCtx, lc fx.Lifecycle, h host.Host, svc *hello.Service) error {
func RunHello(mctx helpers.MetricsCtx, lc fx.Lifecycle, h host.Host, svc *hello.Service) {
h.SetStreamHandler(hello.ProtocolID, svc.HandleStream)
bundle := inet.NotifyBundle{