Documentation ¶
Index ¶
- type Bitmapper
- func (bm *Bitmapper) AddMember(ctx context.Context, key string, memberDID string) error
- func (bm *Bitmapper) GetBitmap(ctx context.Context, key string) (*roaring.Bitmap, error)
- func (bm *Bitmapper) GetIntersection(ctx context.Context, keys []string) (*roaring.Bitmap, error)
- func (bm *Bitmapper) GetMembers(ctx context.Context, key string) ([]uint32, error)
- func (bm *Bitmapper) GetUnion(ctx context.Context, keys []string) (*roaring.Bitmap, error)
- func (bm *Bitmapper) RemoveMember(ctx context.Context, key string, memberDID string) error
- func (bm *Bitmapper) Shutdown() error
- type Consumer
- func (c *Consumer) HandleCreatePost(ctx context.Context, repo, rkey string, indexedAt time.Time, ...) error
- func (c *Consumer) HandleCreateRecord(ctx context.Context, repo string, collection string, rkey string, ...) (*time.Time, error)
- func (c *Consumer) HandleDeletePost(ctx context.Context, repo, rkey string) error
- func (c *Consumer) HandleDeleteRecord(ctx context.Context, repo string, collection string, rkey string) error
- func (c *Consumer) OnCommit(ctx context.Context, evt *models.Event) error
- func (c *Consumer) OnEvent(ctx context.Context, evt *models.Event) error
- func (c *Consumer) ReadCursor(ctx context.Context) error
- func (c *Consumer) Shutdown() error
- func (c *Consumer) TrimRecentPosts(ctx context.Context, maxAge time.Duration) error
- func (c *Consumer) WriteCursor(ctx context.Context) error
- type Delete
- type Progress
- type URI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bitmapper ¶
type Bitmapper struct { Store *store.Store ActiveBitmaps map[string]*roaring.Bitmap // contains filtered or unexported fields }
Bitmapper is a service for tracking bitmaps
func NewBitmapper ¶
NewBitmapper creates a new Bitmapper
func (*Bitmapper) GetIntersection ¶
func (*Bitmapper) GetMembers ¶
func (*Bitmapper) RemoveMember ¶
type Consumer ¶
type Consumer struct { SocketURL string Progress *Progress Logger *zap.SugaredLogger RedisClient *redis.Client ProgressKey string Store *store.Store // contains filtered or unexported fields }
Consumer is the consumer of the firehose
func NewConsumer ¶
func NewConsumer( ctx context.Context, logger *zap.SugaredLogger, redisClient *redis.Client, redisPrefix string, store *store.Store, socketURL string, graphdRoot string, shardDBNodes []string, ) (*Consumer, error)
NewConsumer creates a new consumer
func (*Consumer) HandleCreatePost ¶
func (*Consumer) HandleCreateRecord ¶
func (c *Consumer) HandleCreateRecord( ctx context.Context, repo string, collection string, rkey string, rec json.RawMessage, ) (*time.Time, error)
HandleCreateRecord handles a create record event from the firehose
func (*Consumer) HandleDeletePost ¶
func (*Consumer) HandleDeleteRecord ¶
func (c *Consumer) HandleDeleteRecord( ctx context.Context, repo string, collection string, rkey string, ) error
HandleDeleteRecord handles a delete record event from the firehose
func (*Consumer) OnCommit ¶
HandleRepoCommit handles a repo commit event from the firehose and processes the records
func (*Consumer) ReadCursor ¶
ReadCursor reads the cursor from redis
func (*Consumer) TrimRecentPosts ¶
TrimRecentPosts trims the recent posts from the recent_posts table and the active posters from redis
Click to show internal directories.
Click to hide internal directories.