Documentation ¶
Index ¶
- type Backend
- type ErrWrongSequence
- type MockBackend
- func (m *MockBackend) Close() error
- func (m *MockBackend) Connect() error
- func (m *MockBackend) Load() (map[string]*registry.Event, error)
- func (m *MockBackend) LoadByEntityId(id string) ([]*registry.Event, error)
- func (m *MockBackend) LoadByEventType(eventType string) ([]*registry.Event, error)
- func (m *MockBackend) Save(events []*registry.Event, expectedSeq uint64) (uint64, error)
- func (m *MockBackend) SetEventRegistry(er *registry.EventRegistry)
- func (m *MockBackend) Setup(name string, replicationFactor int) error
- type NATSBackend
- func (n *NATSBackend) Close() error
- func (n *NATSBackend) Connect() error
- func (n *NATSBackend) Load() (map[string]*registry.Event, error)
- func (n *NATSBackend) LoadByEntityId(id string) ([]*registry.Event, error)
- func (n *NATSBackend) LoadByEventType(evType string) ([]*registry.Event, error)
- func (n *NATSBackend) Save(events []*registry.Event, expectedSequence uint64) (uint64, error)
- func (n *NATSBackend) SetEventRegistry(er *registry.EventRegistry)
- func (n *NATSBackend) Setup(storeName string, replicas int) error
- type NATSBackendConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Connect() error Close() error SetEventRegistry(*registry.EventRegistry) Setup(string, int) error Save([]*registry.Event, uint64) (uint64, error) // returns all events in the store in a map of entity id to events Load() (map[string]*registry.Event, error) // returns all events for a given entity id LoadByEntityId(string) ([]*registry.Event, error) // returns all events for a given event type LoadByEventType(string) ([]*registry.Event, error) }
type ErrWrongSequence ¶
func (*ErrWrongSequence) Error ¶
func (e *ErrWrongSequence) Error() string
type MockBackend ¶
func (*MockBackend) Close ¶
func (m *MockBackend) Close() error
func (*MockBackend) Connect ¶
func (m *MockBackend) Connect() error
func (*MockBackend) LoadByEntityId ¶
func (m *MockBackend) LoadByEntityId(id string) ([]*registry.Event, error)
func (*MockBackend) LoadByEventType ¶
func (m *MockBackend) LoadByEventType(eventType string) ([]*registry.Event, error)
func (*MockBackend) SetEventRegistry ¶
func (m *MockBackend) SetEventRegistry(er *registry.EventRegistry)
type NATSBackend ¶
type NATSBackend struct {
// contains filtered or unexported fields
}
func NewNATSBackend ¶
func NewNATSBackend(opt NATSBackendConfig) *NATSBackend
func (*NATSBackend) Close ¶
func (n *NATSBackend) Close() error
func (*NATSBackend) Connect ¶
func (n *NATSBackend) Connect() error
func (*NATSBackend) LoadByEntityId ¶
func (n *NATSBackend) LoadByEntityId(id string) ([]*registry.Event, error)
func (*NATSBackend) LoadByEventType ¶
func (n *NATSBackend) LoadByEventType(evType string) ([]*registry.Event, error)
func (*NATSBackend) SetEventRegistry ¶
func (n *NATSBackend) SetEventRegistry(er *registry.EventRegistry)
type NATSBackendConfig ¶
Click to show internal directories.
Click to hide internal directories.