Documentation
¶
Index ¶
- Variables
- func NewNonBlockingEvent(seqNo int64, payload event.NonBlockingPayload, context event.Context) *event.Event
- type Database
- type Resolver
- type ResolverImpl
- type ResolverUserQueries
- type Service
- func (s *Service) DidCommitTx(ctx context.Context)
- func (s *Service) DispatchEventImmediately(ctx context.Context, payload event.NonBlockingPayload) (err error)
- func (s *Service) DispatchEventOnCommit(ctx context.Context, payload event.Payload) (err error)
- func (s *Service) DispatchEventWithoutTx(ctx context.Context, e *event.Event) (err error)
- func (s *Service) PrepareBlockingEventWithTx(ctx context.Context, payload event.BlockingPayload) (e *event.Event, err error)
- func (s *Service) WillCommitTx(ctx context.Context) (err error)
- type Sink
- type Store
- type StoreImpl
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( NewService, NewStoreImpl, wire.Struct(new(ResolverImpl), "*"), wire.Bind(new(Store), new(*StoreImpl)), wire.Bind(new(Resolver), new(*ResolverImpl)), )
View Source
var EventLogger = slogutil.NewLogger("event")
Functions ¶
func NewNonBlockingEvent ¶
Types ¶
type ResolverImpl ¶
type ResolverImpl struct {
Users ResolverUserQueries
}
type ResolverUserQueries ¶
type Service ¶
type Service struct {
AppID config.AppID
RemoteIP httputil.RemoteIP
UserAgentString httputil.UserAgentString
HTTPRequestURL httputil.HTTPRequestURL
Database Database
Clock clock.Clock
Localization *config.LocalizationConfig
Store Store
Resolver Resolver
Sinks []Sink
NonBlockingPayloads []event.NonBlockingPayload `wire:"-"`
NonBlockingEvents []*event.Event `wire:"-"`
DatabaseHooked bool `wire:"-"`
IsDispatchEventErr bool `wire:"-"`
}
func NewService ¶
func NewService( appID config.AppID, remoteIP httputil.RemoteIP, userAgentString httputil.UserAgentString, httpRequestURL httputil.HTTPRequestURL, database Database, clock clock.Clock, localization *config.LocalizationConfig, store Store, resolver Resolver, hookSink *hook.Sink, auditSink *audit.Sink, searchSink *reindex.Sink, userInfoSink *userinfo.Sink, ) *Service
func (*Service) DidCommitTx ¶
func (*Service) DispatchEventImmediately ¶
func (s *Service) DispatchEventImmediately(ctx context.Context, payload event.NonBlockingPayload) (err error)
DispatchEventImmediately dispatches the event immediately.
func (*Service) DispatchEventOnCommit ¶
DispatchEventOnCommit dispatches the event according to the tranaction lifecycle.
func (*Service) DispatchEventWithoutTx ¶
DispatchEventWithoutTx dispatches the blocking event immediately without transaction.
func (*Service) PrepareBlockingEventWithTx ¶
type StoreImpl ¶
type StoreImpl struct {
SQLBuilder *appdb.SQLBuilder
SQLExecutor *appdb.SQLExecutor
}
func NewStoreImpl ¶
func NewStoreImpl( sqlBuilder *appdb.SQLBuilder, sqlExecutor *appdb.SQLExecutor) *StoreImpl
Click to show internal directories.
Click to hide internal directories.