streams

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	Handle(ctx context.Context, msg Message) error
}

type HandlerFunc added in v0.8.0

type HandlerFunc func(ctx context.Context, msg Message) error

func (HandlerFunc) Handle added in v0.8.0

func (fn HandlerFunc) Handle(ctx context.Context, msg Message) error

type Id

type Id struct {
	Group  string
	Entity string
}

func ParseId

func ParseId(format string, args ...interface{}) Id

func (Id) HasEntity

func (id Id) HasEntity() bool

func (Id) String

func (id Id) String() string

func (Id) Value

func (id Id) Value() (driver.Value, error)

func (Id) WithEntity

func (id Id) WithEntity(format string, args ...interface{}) Id

convenience method to construct an entity id from another

type Message

type Message struct {
	Number        int64       // place in the stream, starting at 1
	GlobalNumber  int64       // Ordering across all messages in this Event Source
	Stream        Id          // name of the stream this message belongs to
	Type          string      // name of the type of the message
	Data          interface{} // instance of the given Group
	CorrelationId string      // Application generated id to correlate messages
	Time          time.Time   // time the message was first recorded
}

type NamedSnapshot

type NamedSnapshot interface {
	SnapshotName() string
}

Marker interface used to indicate that a view or projection supports snapshotting. The provided name is used to store the instance as a json blob.

Jump to

Keyboard shortcuts

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