Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidTypeError = fmt.Errorf("event type is invalid")
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder interface { WithType(t Type) builder WithData(data []byte) builder WithMetadata(data Metadata) builder BuildRead() (ev ByteReadEvent, err error) BuildStore() (ev WriteEvent[[]byte], err error) }
func NewBuilder ¶
func NewBuilder() Builder
type ByteReadEvent ¶ added in v0.13.0
type ByteWriteEvent ¶ added in v0.13.0
type ByteWriteEvent WriteEvent[[]byte]
type Metadata ¶
type Metadata struct { Stream string `json:"stream"` EventType Type `json:"event_type"` Version string `json:"version"` DataType string `json:"data_type"` Key string `json:"key"` //Strictly used for things like getting the cryptoKey Extra map[string]any `json:"extra"` Created time.Time `json:"created"` }
type ReadEventWAcc ¶ added in v0.13.0
type WriteEvent ¶ added in v0.13.0
type WriteEvent[T any] struct { // contains filtered or unexported fields }
func (*WriteEvent[T]) Close ¶ added in v0.17.0
func (e *WriteEvent[T]) Close(status store.WriteStatus)
func (*WriteEvent[T]) Done ¶ added in v0.17.0
func (e *WriteEvent[T]) Done() <-chan store.WriteStatus
func (*WriteEvent[T]) Event ¶ added in v0.17.0
func (e *WriteEvent[T]) Event() *Event[T]
func (*WriteEvent[T]) StatusChan ¶ added in v0.17.0
func (e *WriteEvent[T]) StatusChan() chan store.WriteStatus
func (*WriteEvent[T]) Store ¶ added in v0.17.0
func (e *WriteEvent[T]) Store() *store.WriteEvent
type WriteEventReadStatus ¶ added in v0.13.0
type WriteEventReadStatus[T any] interface { Event() *Event[T] Done() <-chan store.WriteStatus Close(store.WriteStatus) Store() *store.WriteEvent StatusChan() chan store.WriteStatus }
func Map ¶ added in v0.17.0
func Map[OT, NT any](e WriteEventReadStatus[OT], f func(OT) NT) WriteEventReadStatus[NT]
func NewWrite ¶ added in v0.18.8
func NewWrite[T any](t Type, data T, m Metadata) WriteEventReadStatus[T]
func NewWriteEvent ¶ added in v0.13.0
func NewWriteEvent[T any](e Event[T]) WriteEventReadStatus[T]
Click to show internal directories.
Click to hide internal directories.