go-waku/waku/v2/node/service.go
Prem Chaitanya Prathi b5be83a02e
feat : autoshard relay api (#807)
* fix: using relay without bcaster should consume and drop messages

* update relay api usage

* move subscription to broadcaster

* move filter logic under subscription

* Support more than 1 relay subscription for a pubSubTopic

* modify relay Publish API to derive pubSubTopic based on autosharding

* implement relay RPC methods for autosharding

* remove relay msgChannel and relay on pubsub buffersize for subscription

Co-authored-by: richΛrd <info@richardramos.me>

* handle relay subscribe with noConsumer and address issue reported in code review

* chore: reorg relay code

---------

Co-authored-by: richΛrd <info@richardramos.me>
2023-10-21 01:26:18 +05:30

21 lines
337 B
Go

package node
import (
"context"
"github.com/libp2p/go-libp2p/core/host"
"github.com/waku-org/go-waku/waku/v2/protocol/relay"
)
type Service interface {
SetHost(h host.Host)
Start(context.Context) error
Stop()
}
type ReceptorService interface {
SetHost(h host.Host)
Stop()
Start(context.Context, *relay.Subscription) error
}