Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnMeowCreated ¶
func OnMeowCreated(f func(MeowCreatedMessage)) error
func PublishMeowCreated ¶
func SetEventStore ¶
func SetEventStore(es EventStore)
func SubscribeMeowCreated ¶
func SubscribeMeowCreated() (<-chan MeowCreatedMessage, error)
Types ¶
type EventStore ¶
type EventStore interface { Close() PublishMeowCreated(meow schema.Meow) error SubscribeMeowCreated() (<-chan MeowCreatedMessage, error) OnMeowCreated(f func(MeowCreatedMessage)) error }
type MeowCreatedMessage ¶
func (*MeowCreatedMessage) Key ¶
func (m *MeowCreatedMessage) Key() string
type NatsEventStore ¶
type NatsEventStore struct {
// contains filtered or unexported fields
}
func NewNats ¶
func NewNats(url string) (*NatsEventStore, error)
func (*NatsEventStore) Close ¶
func (e *NatsEventStore) Close()
func (*NatsEventStore) OnMeowCreated ¶
func (e *NatsEventStore) OnMeowCreated(f func(MeowCreatedMessage)) (err error)
func (*NatsEventStore) PublishMeowCreated ¶
func (e *NatsEventStore) PublishMeowCreated(meow schema.Meow) error
func (*NatsEventStore) SubscribeMeowCreated ¶
func (e *NatsEventStore) SubscribeMeowCreated() (<-chan MeowCreatedMessage, error)
Click to show internal directories.
Click to hide internal directories.