Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnBookCreated ¶
func OnBookCreated(f func(BookCreatedMessage)) error
func SetEventStore ¶
func SetEventStore(es EventStore)
func SubsribeBookCreated ¶
func SubsribeBookCreated() (<-chan BookCreatedMessage, error)
Types ¶
type BookCreatedMessage ¶
func (*BookCreatedMessage) Key ¶
func (m *BookCreatedMessage) Key() string
type EventStore ¶
type EventStore interface { Close() SubsribeBookCreated() (<-chan BookCreatedMessage, error) OnBookCreated(f func(BookCreatedMessage)) error }
type NatsEventStore ¶
type NatsEventStore struct {
// contains filtered or unexported fields
}
func NewNats ¶
func NewNats(url string) (*NatsEventStore, error)
func (*NatsEventStore) Close ¶
func (n *NatsEventStore) Close()
func (*NatsEventStore) OnBookCreated ¶
func (n *NatsEventStore) OnBookCreated(f func(BookCreatedMessage)) error
func (*NatsEventStore) SubsribeBookCreated ¶
func (n *NatsEventStore) SubsribeBookCreated() (<-chan BookCreatedMessage, error)
Click to show internal directories.
Click to hide internal directories.