consumer

package
v0.7.13 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptEvent

func DecryptEvent[BT any, T bcts.ReadWriter[BT]](
	e event.ReadEvent[bcts.Bytes, *bcts.Bytes],
	cryptoKey stream.CryptoKeyProvider,
) (out event.ReadEvent[BT, T], err error)

func EncryptEvent

func EncryptEvent[BT any, T bcts.ReadWriter[BT]](
	e *event.Event[BT, T],
	cryptoKey stream.CryptoKeyProvider,
) (es event.Event[bcts.Bytes, *bcts.Bytes], err error)

Types

type Consumer

type Consumer[BT any, T bcts.ReadWriter[BT]] interface {
	Write() chan<- event.WriteEventReadStatus[BT, T]
	Stream(
		eventTypes []event.Type,
		from store.StreamPosition,
		filter stream.Filter,
		ctx context.Context,
	) (out <-chan event.ReadEventWAcc[BT, T], err error)
	Name() string
	End() (pos uint64, err error)
	FilteredEnd(eventTypes []event.Type, filter stream.Filter) (pos uint64, err error)
}

func New

func New[BT any, T bcts.ReadWriter[BT]](
	s stream.Stream,
	cryptoKey stream.CryptoKeyProvider,
	ctx context.Context,
) (out Consumer[BT, T], err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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