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

Method handleInbound

IceFireDB-SQLProxy/pkg/p2p/pubsub.go:61–74  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

59}
60
61func (ps *PubSub) handleInbound(ctx context.Context) {
62 for {
63 msg, err := ps.Sub.Next(ctx)
64 if err != nil {
65 close(ps.Inbound)
66 return
67 }
68 ps.Inbound <- &Message{
69 SenderID: msg.GetFrom().String(),
70 Content: string(msg.GetData()),
71 msg: msg,
72 }
73 }
74}
75
76func (ps *PubSub) handleOutbound(ctx context.Context) {
77 for msg := range ps.Outbound {

Callers 1

JoinPubSubFunction · 0.95

Calls 4

GetFromMethod · 0.80
GetDataMethod · 0.80
StringMethod · 0.65
NextMethod · 0.45

Tested by

no test coverage detected