Documentation ¶
Index ¶
- Constants
- Variables
- func AddESProjector(ioc ioc.IDig) ioc.IDig
- func BehaviorStore(log logger.IAppLogger, newDb EventStoreDBFtor) comps.BehaviorStoreFtor
- func EventProjector(newClient EventStoreDBFtor) comps.IProjector
- func EventSourcing(cfgPath config.Path) ioc.IDig
- func EventStore(log logger.IAppLogger, newClient EventStoreDBFtor) comps.EventStoreFtor
- func EvtProjFtor(newClient EventStoreDBFtor) comps.ProjectorFtor
- type EventStoreDBFtor
- type IESDB
- type Logger
- type ProjectionWorkerFunc
- type ProjectorName
- type SubscriptionGroupName
Constants ¶
View Source
const (
NoESDB = "No ESDB"
)
View Source
const (
ProjectorFmt = "eventstoreDB.Projector"
)
Variables ¶
View Source
var (
ErrNoESDB = fmt.Errorf(NoESDB)
)
Functions ¶
func BehaviorStore ¶
func BehaviorStore(log logger.IAppLogger, newDb EventStoreDBFtor) comps.BehaviorStoreFtor
BehaviorStore is an Injection that injects a functor for IBehaviorStore
func EventProjector ¶
func EventProjector(newClient EventStoreDBFtor) comps.IProjector
EventProjector is a Projector that marshals events onto the Mediator
func EventStore ¶
func EventStore(log logger.IAppLogger, newClient EventStoreDBFtor) comps.EventStoreFtor
func EvtProjFtor ¶
func EvtProjFtor(newClient EventStoreDBFtor) comps.ProjectorFtor
EvtProjFtor is a functor for Projectors that marshal events onto the Mediator where they can be handled by all kinds of GenProjection Handlers.
Types ¶
type EventStoreDBFtor ¶
EventStoreDBFtor is a functor that returns an EventStoreDB client
func SingletonESClient ¶
func SingletonESClient(cfg config.IAppConfig) EventStoreDBFtor
SingletonESClient is an injection that returns an EventStoreDB functor
func TransientESClient ¶
func TransientESClient(cfg config.IAppConfig) EventStoreDBFtor
TransientESClient returns a functor that creates a transient EventStoreDB client
type IESDB ¶
type IESDB interface { Close() error AppendToStream( context context.Context, streamID string, opts esdb.AppendToStreamOptions, events ...esdb.EventData, ) (*esdb.WriteResult, error) SetStreamMetadata( context context.Context, streamID string, opts esdb.AppendToStreamOptions, metadata esdb.StreamMetadata, ) (*esdb.WriteResult, error) GetStreamMetadata( context context.Context, streamID string, opts esdb.ReadStreamOptions, ) (*esdb.StreamMetadata, error) DeleteStream( parent context.Context, streamID string, opts esdb.DeleteStreamOptions, ) (*esdb.DeleteResult, error) TombstoneStream( parent context.Context, streamID string, opts esdb.TombstoneStreamOptions, ) (*esdb.DeleteResult, error) ReadStream( context context.Context, streamID string, opts esdb.ReadStreamOptions, count uint64, ) (*esdb.ReadStream, error) ReadAll( context context.Context, opts esdb.ReadAllOptions, count uint64, ) (*esdb.ReadStream, error) SubscribeToStream( parent context.Context, streamID string, opts esdb.SubscribeToStreamOptions, ) (*esdb.Subscription, error) SubscribeToAll( parent context.Context, opts esdb.SubscribeToAllOptions, ) (*esdb.Subscription, error) SubscribeToPersistentSubscription( ctx context.Context, streamName string, groupName string, options esdb.SubscribeToPersistentSubscriptionOptions, ) (*esdb.PersistentSubscription, error) SubscribeToPersistentSubscriptionToAll( ctx context.Context, groupName string, options esdb.SubscribeToPersistentSubscriptionOptions, ) (*esdb.PersistentSubscription, error) CreatePersistentSubscription( ctx context.Context, streamName string, groupName string, options esdb.PersistentStreamSubscriptionOptions, ) error CreatePersistentSubscriptionToAll( ctx context.Context, groupName string, options esdb.PersistentAllSubscriptionOptions, ) error UpdatePersistentSubscription( ctx context.Context, streamName string, groupName string, options esdb.PersistentStreamSubscriptionOptions, ) error UpdatePersistentSubscriptionToAll( ctx context.Context, groupName string, options esdb.PersistentAllSubscriptionOptions, ) error DeletePersistentSubscription( ctx context.Context, streamName string, groupName string, options esdb.DeletePersistentSubscriptionOptions, ) error DeletePersistentSubscriptionToAll( ctx context.Context, groupName string, options esdb.DeletePersistentSubscriptionOptions, ) error ReplayParkedMessages( ctx context.Context, streamName string, groupName string, options esdb.ReplayParkedMessagesOptions) error ReplayParkedMessagesToAll(ctx context.Context, groupName string, options esdb.ReplayParkedMessagesOptions) error ListAllPersistentSubscriptions(ctx context.Context, options esdb.ListPersistentSubscriptionsOptions) ([]esdb.PersistentSubscriptionInfo, error) ListPersistentSubscriptionsForStream(ctx context.Context, streamName string, options esdb.ListPersistentSubscriptionsOptions) ([]esdb.PersistentSubscriptionInfo, error) ListPersistentSubscriptionsToAll(ctx context.Context, options esdb.ListPersistentSubscriptionsOptions) ([]esdb.PersistentSubscriptionInfo, error) GetPersistentSubscriptionInfo(ctx context.Context, streamName string, groupName string, options esdb.GetPersistentSubscriptionOptions) (*esdb.PersistentSubscriptionInfo, error) GetPersistentSubscriptionInfoToAll(ctx context.Context, groupName string, options esdb.GetPersistentSubscriptionOptions) (*esdb.PersistentSubscriptionInfo, error) RestartPersistentSubscriptionSubsystem(ctx context.Context, options esdb.RestartPersistentSubscriptionSubsystemOptions) error }
type Logger ¶
type Logger interface { logger.IAppLogger ProjectionEvent(projectionName string, groupName string, event *esdb.ResolvedEvent, workerID int) }
type ProjectionWorkerFunc ¶
type ProjectorName ¶
type ProjectorName string
type SubscriptionGroupName ¶
type SubscriptionGroupName string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.