ingester

package
v0.0.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 *zap.Logger,
	store *store.PGXStore,
) *ActorCache

func (*ActorCache) CreatePendingCandidateActor added in v0.0.4

func (crc *ActorCache) CreatePendingCandidateActor(ctx context.Context, did string) (err error)

func (*ActorCache) GetByDID added in v0.0.4

func (crc *ActorCache) GetByDID(
	did string,
) *v1.Actor

func (*ActorCache) Start added in v0.0.4

func (crc *ActorCache) Start(ctx context.Context) error

func (*ActorCache) Sync added in v0.0.4

func (crc *ActorCache) Sync(ctx context.Context) error

type FirehoseIngester

type FirehoseIngester struct {
	// contains filtered or unexported fields
}

func NewFirehoseIngester

func NewFirehoseIngester(
	log *zap.Logger, store *store.PGXStore, crc *ActorCache, bgsHost string,
) *FirehoseIngester

func (*FirehoseIngester) Start

func (fi *FirehoseIngester) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL