streams

package
v0.5.0 Latest Latest
Warning

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

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

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 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
	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
	GroupNumber int64       // Ordering within the group
	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