jetstream

package
v1.14.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	GetLastTimeUs() (int64, error)
	SaveLastTimeUs(int64) error
}

type JetstreamClient

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

func NewJetstreamClient

func NewJetstreamClient(endpoint, ident string, collections []string, cfg *client.ClientConfig, logger *slog.Logger, db DB, waitForDid, logDids bool) (*JetstreamClient, error)

func (*JetstreamClient) AddDid

func (j *JetstreamClient) AddDid(did string)

func (*JetstreamClient) RemoveDid

func (j *JetstreamClient) RemoveDid(did string)

func (*JetstreamClient) StartJetstream

func (j *JetstreamClient) StartJetstream(ctx context.Context, processFunc func(context.Context, *models.Event) error) error

StartJetstream starts the jetstream client and processes events using the provided processFunc. The caller is responsible for saving the last time_us to the database (just use your db.UpdateLastTimeUs).

type Set

type Set[T comparable] map[T]struct{}

Source Files

  • jetstream.go

Jump to

Keyboard shortcuts

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