Documentation ¶
Overview ¶
Package gossip implements the createHistoryStream muxrpc call. Legacy (non-EBT) Replication of fetching and verifying the selected feeds is found here.
Index ¶
- func NewFetcher(ctx context.Context, log logging.Interface, r repo.Interface, id refs.FeedRef, ...) *plugin
- func NewServer(ctx context.Context, log logging.Interface, id refs.FeedRef, ...) histPlugin
- type FeedManager
- type HMACSecret
- type IgnoreConnectHandler
- type LegacyGossip
- func (h *LegacyGossip) FetchAll(ctx context.Context, e muxrpc.Endpoint, set *ssb.StrFeedSet, withLive bool) error
- func (g *LegacyGossip) HandleCall(ctx context.Context, req *muxrpc.Request)
- func (g *LegacyGossip) HandleConnect(ctx context.Context, e muxrpc.Endpoint)
- func (LegacyGossip) Handled(m muxrpc.Method) bool
- func (g *LegacyGossip) StartLegacyFetching(ctx context.Context, e muxrpc.Endpoint, withLive bool)
- type Promisc
- type WithLive
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFetcher ¶
func NewFetcher( ctx context.Context, log logging.Interface, r repo.Interface, id refs.FeedRef, rxlog margaret.Log, userFeeds multilog.MultiLog, fm *FeedManager, wantList ssb.ReplicationLister, vr *message.VerificationRouter, opts ...interface{}, ) *plugin
NewFetcher returns a muxrpc handler plugin which requests and verifies feeds, based on the passed replication lister.
Types ¶
type FeedManager ¶
type FeedManager struct { ReceiveLog margaret.Log UserFeeds multilog.MultiLog // contains filtered or unexported fields }
FeedManager handles serving gossip about User Feeds.
func NewFeedManager ¶
func NewFeedManager( ctx context.Context, rxlog margaret.Log, userFeeds multilog.MultiLog, info logging.Interface, sysGauge metrics.Gauge, sysCtr metrics.Counter, ) *FeedManager
NewFeedManager returns a new FeedManager used for gossiping about User Feeds.
func (*FeedManager) CreateStreamHistory ¶
func (m *FeedManager) CreateStreamHistory( ctx context.Context, sink *muxrpc.ByteSink, arg message.CreateHistArgs, ) error
CreateStreamHistory serves the sink a CreateStreamHistory request to the sink.
type HMACSecret ¶
type HMACSecret *[32]byte
type IgnoreConnectHandler ¶
type IgnoreConnectHandler struct{ muxrpc.Handler }
func (IgnoreConnectHandler) HandleConnect ¶
func (IgnoreConnectHandler) HandleConnect(ctx context.Context, edp muxrpc.Endpoint)
type LegacyGossip ¶
type LegacyGossip struct { Id refs.FeedRef ReceiveLog margaret.Log UserFeeds multilog.MultiLog WantList ssb.ReplicationLister Info logging.Interface // contains filtered or unexported fields }
LegacyGossip implements incoming and outgoing createHistoryStream calls. Either register this plugin's HandleConnect for fetching feeds or the sbot.Negotiate plugin to get EBT opertunistlicly and fallback to this don't register both!
TODO: add feature flag for live streaming
func (*LegacyGossip) FetchAll ¶
func (h *LegacyGossip) FetchAll( ctx context.Context, e muxrpc.Endpoint, set *ssb.StrFeedSet, withLive bool, ) error
func (*LegacyGossip) HandleCall ¶
func (g *LegacyGossip) HandleCall( ctx context.Context, req *muxrpc.Request, )
func (*LegacyGossip) HandleConnect ¶
func (g *LegacyGossip) HandleConnect(ctx context.Context, e muxrpc.Endpoint)
HandleConnect on this handler triggers legacy createHistoryStream replication.
func (LegacyGossip) Handled ¶
func (LegacyGossip) Handled(m muxrpc.Method) bool
func (*LegacyGossip) StartLegacyFetching ¶
func (g *LegacyGossip) StartLegacyFetching(ctx context.Context, e muxrpc.Endpoint, withLive bool)