stream

package
v0.14.9 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 8 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StaticProvider added in v0.8.0

func StaticProvider(key log.RedactedString) func(_ string) log.RedactedString

Types

type CryptoKeyProvider

type CryptoKeyProvider func(key string) log.RedactedString

type Filter

type Filter func(md event.Metadata) bool

func ReadAll

func ReadAll() Filter

func ReadDataType added in v0.3.1

func ReadDataType(t string) Filter

func ReadEventType added in v0.3.1

func ReadEventType(t event.Type) Filter

type FilteredStream added in v0.13.0

type FilteredStream interface {
	Write() chan<- event.ByteWriteEvent
	Store(event event.ByteEvent) (position uint64, err error)
	Stream(eventTypes []event.Type, from store.StreamPosition, filter Filter, ctx context.Context) (out <-chan event.ByteReadEvent, err error)
	End() (pos uint64, err error)
	Name() string
}

func Init

func Init(st Stream, ctx context.Context) (out FilteredStream, err error)

type Map added in v0.5.0

type Map[T any] interface {
	Store(id string, data T)
	Load(id string) (data T, ok bool)
	Delete(id string)
	Range(f func(k string, v T) bool)
}

func New added in v0.5.0

func New[T any]() Map[T]

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