MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / NewPubsubStore

Function NewPubsubStore

IceFireDB-PubSub/pkg/ppubsub/pubsubStore.go:38–46  ·  view source on GitHub ↗
(ctx context.Context, p2p *p2p.P2P)

Source from the content-addressed store, hash-verified

36}
37
38func NewPubsubStore(ctx context.Context, p2p *p2p.P2P) *pubsubStore {
39 s := &pubsubStore{
40 ctx: ctx,
41 p2p: p2p,
42 join: make(map[string]*PubSub),
43 writer: make(map[string]map[string]*RESPHandle.WriterHandle),
44 }
45 return s
46}
47
48func Pub(topicName string, message string) error {
49 if _, ok := pss.join[topicName]; !ok {

Callers 1

InitPubSubFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected