Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidType = 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[bcts.Bytes, *bcts.Bytes], err error) }
func NewBuilder ¶
func NewBuilder() Builder
type ByteWriteEvent ¶
type ByteWriteEvent WriteEvent[bcts.Bytes, *bcts.Bytes]
type Event ¶
type Event[BT any, T bcts.ReadWriter[BT]] struct { Metadata Metadata `json:"metadata"` Data T `json:"data"` Type Type `json:"type"` }
type Metadata ¶
type ReadEvent ¶
type ReadEvent[BT any, T bcts.ReadWriter[BT]] struct { Created time.Time `json:"created"` Event[BT, T] Position uint64 `json:"position"` }
type ReadEventWAcc ¶
type WriteEvent ¶
type WriteEvent[BT any, T bcts.ReadWriter[BT]] struct { // contains filtered or unexported fields }
func (*WriteEvent[BT, T]) Close ¶
func (e *WriteEvent[BT, T]) Close(status store.WriteStatus)
func (*WriteEvent[BT, T]) Done ¶
func (e *WriteEvent[BT, T]) Done() <-chan store.WriteStatus
func (*WriteEvent[BT, T]) Event ¶
func (e *WriteEvent[BT, T]) Event() *Event[BT, T]
func (*WriteEvent[BT, T]) StatusChan ¶
func (e *WriteEvent[BT, T]) StatusChan() chan store.WriteStatus
func (*WriteEvent[BT, T]) Store ¶
func (e *WriteEvent[BT, T]) Store() *store.WriteEvent
type WriteEventReadStatus ¶
type WriteEventReadStatus[BT any, T bcts.ReadWriter[BT]] interface { Event() *Event[BT, T] Done() <-chan store.WriteStatus Close(store.WriteStatus) Store() *store.WriteEvent StatusChan() chan store.WriteStatus }
func Map ¶
func Map[OT, NT any, OOT bcts.ReadWriter[OT], NNT bcts.ReadWriter[NT]]( e WriteEventReadStatus[OT, OOT], f func(OOT) NNT, ) WriteEventReadStatus[NT, NNT]
func NewWriteEvent ¶
func NewWriteEvent[BT any, T bcts.ReadWriter[BT]]( e Event[BT, T], ) WriteEventReadStatus[BT, T]
Click to show internal directories.
Click to hide internal directories.