Documentation
¶
Index ¶
- type Aggregate
- type AggregateBaseState
- type App
- type AppConfig
- type AppOption
- type Command
- type CommandAggregateCreator
- type CommandAggregateDestroyer
- type CommandHandler
- type CommandValidator
- type Container
- type Event
- type EventEnvelope
- type EventMetadata
- type EventStore
- type Handler
- type Handlers
- type LiveProjection
- type Projection
- type Projector
- type Snapshot
- type SnapshotStore
- type UniqueStateValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AggregateBaseState ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func (*App) RegisterHandlers ¶
func (*App) RegisterProjections ¶
func (a *App) RegisterProjections(projects ...Projection)
type AppConfig ¶
type AppConfig struct { Name string ClusterProvider cluster.ClusterProvider SnapshotStore SnapshotStore EventStore EventStore }
type CommandAggregateCreator ¶
type CommandAggregateCreator interface {
CreateAggregate()
}
type CommandAggregateDestroyer ¶
type CommandAggregateDestroyer interface {
DestoryAggregate()
}
type CommandHandler ¶
type CommandHandler struct {
// contains filtered or unexported fields
}
aggregateHandler impls ghub.com/revent-dev/revent/proto.Aggregate
func (*CommandHandler) Handle ¶
func (h *CommandHandler) Handle(req *proto.CommandRequest, ctx cluster.GrainContext) (*proto.CommandResponse, error)
func (*CommandHandler) Init ¶
func (h *CommandHandler) Init(ctx cluster.GrainContext)
func (*CommandHandler) ReceiveDefault ¶
func (h *CommandHandler) ReceiveDefault(ctx cluster.GrainContext)
func (*CommandHandler) Terminate ¶
func (h *CommandHandler) Terminate(ctx cluster.GrainContext)
type CommandValidator ¶
type CommandValidator interface {
Validate() error
}
type EventEnvelope ¶
type EventEnvelope struct { Data Event Metadata EventMetadata }
type EventMetadata ¶
type EventMetadata struct {
AggregateID aggregate.AggregateID
}
type EventStore ¶
type EventStore interface { AppendEvent(env EventEnvelope) error Subscribe() (chan EventEnvelope, error) SetAppContainer(c *Container) }
type LiveProjection ¶
type LiveProjection interface { Projection LiveEvents() []Event }
type Projection ¶
type Projection interface {
Process(event EventEnvelope) error
}
type Projector ¶
type Projector struct {
// contains filtered or unexported fields
}
github.com/revent-dev/revent/proto.Projector
func (*Projector) Init ¶
func (p *Projector) Init(ctx cluster.GrainContext)
func (*Projector) ReceiveDefault ¶
func (p *Projector) ReceiveDefault(ctx cluster.GrainContext)
func (*Projector) Start ¶
func (p *Projector) Start(req *proto.StartRequest, ctx cluster.GrainContext) (*proto.StartResponse, error)
func (*Projector) Terminate ¶
func (p *Projector) Terminate(ctx cluster.GrainContext)
type Snapshot ¶
type Snapshot struct { BaseState interface{} UserState interface{} UniqueValue string }
type SnapshotStore ¶
type SnapshotStore interface { GetSnapshot(id aggregate.AggregateID) (Snapshot, error) SaveSnapshot(id aggregate.AggregateID, snapshot Snapshot) error }
type UniqueStateValue ¶
type UniqueStateValue interface {
GetUniqueValue() string
}
Directories
¶
Path | Synopsis |
---|---|
Package proto is generated by protoactor-go/protoc-gen-gograin@0.1.0
|
Package proto is generated by protoactor-go/protoc-gen-gograin@0.1.0 |
samples
|
|
store
|
|
Click to show internal directories.
Click to hide internal directories.