Documentation ¶
Index ¶
- Variables
- type Consumer
- func (c *Consumer) HandleRepoCommit(ctx context.Context, evt *comatproto.SyncSubscribeRepos_Commit) error
- func (c *Consumer) HandleStreamEvent(ctx context.Context, xe *events.XRPCStreamEvent) error
- func (c *Consumer) ReadCursor(ctx context.Context) error
- func (c *Consumer) WriteCursor(ctx context.Context) error
- type Event
- type Progress
- type URI
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EvtCreateRecord = "c" EvtUpdateRecord = "u" EvtDeleteRecord = "d" )
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct { SocketURL string Progress *Progress Emit func(context.Context, Event) error }
Consumer is the consumer of the firehose
func NewConsumer ¶
func NewConsumer( ctx context.Context, socketURL string, progPath string, emit func(context.Context, Event) error, ) (*Consumer, error)
NewConsumer creates a new consumer
func (*Consumer) HandleRepoCommit ¶
func (c *Consumer) HandleRepoCommit(ctx context.Context, evt *comatproto.SyncSubscribeRepos_Commit) error
HandleRepoCommit handles a repo commit event from the firehose and processes the records
func (*Consumer) HandleStreamEvent ¶
HandleStreamEvent handles a stream event from the firehose
func (*Consumer) ReadCursor ¶
ReadCursor reads the cursor from file
Click to show internal directories.
Click to hide internal directories.