events

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
}

func (*Builder) New

func (b *Builder) New(topic string, payload interface{}) (*EventSpec, error)

type EventID

type EventID string

EventID is the unique event identifier

func NewEventID

func NewEventID() EventID

func (EventID) String

func (i EventID) String() string

type EventIDSlice

type EventIDSlice []EventID

func (EventIDSlice) Len

func (x EventIDSlice) Len() int

func (EventIDSlice) Less

func (x EventIDSlice) Less(i, j int) bool

func (EventIDSlice) Sort

func (x EventIDSlice) Sort()

Sort is a convenience method: x.Sort() calls Sort(x).

func (EventIDSlice) Swap

func (x EventIDSlice) Swap(i, j int)

type EventMetadata

type EventMetadata struct {
	Id        EventID
	Topic     string
	CreatedAt time.Time
}

type EventSpec

type EventSpec struct {
	Metadata *EventMetadata
	Payload  interface{}
}

type SerializedEvent

type SerializedEvent struct {
	Metadata          *EventMetadata
	SerializedPayload []byte
}

Jump to

Keyboard shortcuts

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