stream

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StaticProvider

func StaticProvider(key string) func(_ string) string

Types

type CryptoKeyProvider

type CryptoKeyProvider func(key string) string

type Filter

type Filter func(md event.Metadata) bool

func ReadAll

func ReadAll() Filter

func ReadDataType

func ReadDataType(t string) Filter

func ReadEventType

func ReadEventType(t event.Type) Filter

type FilteredStream

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

func Init

func Init[BT any, T bcts.ReadWriter[BT]](
	st Stream,
	ctx context.Context,
) (out FilteredStream[BT, T], err error)

type Stream

type Stream interface {
	Write() chan<- store.WriteEvent
	Stream(from store.StreamPosition, ctx context.Context) (out <-chan store.ReadEvent, err error)
	End() (pos uint64, err error)
	Name() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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