Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultJetstreamURL = "wss://jetstream1.us-east.bsky.network/subscribe"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorCache ¶ added in v0.0.4
type ActorCache struct {
// contains filtered or unexported fields
}
ActorCache holds a view of the candidate actors from the database, refreshing itself every minute. It's designed to be safely called concurrently. This prevents us needing to hit the database for every event which would produce significant load on the db and also increase the amount of time it takes to handle an event we aren't interested in. The only downside to this approach is that it takes up to a minute for new candidate repositories to be monitored.
TODO: Move this to the store as a wrapper around *store.PGXStore ?
func NewActorCache ¶ added in v0.0.4
func NewActorCache( log *slog.Logger, store *store.PGXStore, ) *ActorCache
func (*ActorCache) CreatePendingCandidateActor ¶ added in v0.0.4
func (crc *ActorCache) CreatePendingCandidateActor(ctx context.Context, did string) (err error)
type FirehoseIngester ¶
type FirehoseIngester struct {
// contains filtered or unexported fields
}
func NewFirehoseIngester ¶
func NewFirehoseIngester( log *slog.Logger, store *store.PGXStore, crc *ActorCache, jetstreamURL string, ) *FirehoseIngester
Click to show internal directories.
Click to hide internal directories.