Documentation ¶
Overview ¶
Package orderstore contains implementations of stores used to store order updates.
Index ¶
- func DefaultReaderConfig(topic string, kafkaBrokerUrls []string) kafka.ReaderConfig
- func DefaultWriterConfig(topic string, kafkaBrokerUrls []string) kafka.WriterConfig
- type KafkaStore
- func (ks *KafkaStore) Close()
- func (ks *KafkaStore) LoadOrders(ctx context.Context, filter func(order *model.Order) bool) (map[string]*model.Order, error)
- func (ks *KafkaStore) SubscribeToAllOrders(ctx context.Context, createdAfter time.Time, bufferSize int) (map[string]*model.Order, <-chan *model.Order, error)
- func (ks *KafkaStore) Write(ctx context.Context, order *model.Order) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultReaderConfig ¶
func DefaultWriterConfig ¶
Types ¶
type KafkaStore ¶
type KafkaStore struct {
// contains filtered or unexported fields
}
func NewKafkaStore ¶
func NewKafkaStore(kafkaReaderConfig kafka.ReaderConfig, kafkaWriterConfig kafka.WriterConfig, ownerId string) (*KafkaStore, error)
func (*KafkaStore) Close ¶
func (ks *KafkaStore) Close()
func (*KafkaStore) LoadOrders ¶ added in v1.4.0
func (*KafkaStore) SubscribeToAllOrders ¶
Click to show internal directories.
Click to hide internal directories.