orderstore

package
v1.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package orderstore contains implementations of stores used to store order updates.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultReaderConfig

func DefaultReaderConfig(topic string, kafkaBrokerUrls []string) kafka.ReaderConfig

func DefaultWriterConfig

func DefaultWriterConfig(topic string, kafkaBrokerUrls []string) kafka.WriterConfig

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 (ks *KafkaStore) LoadOrders(ctx context.Context, filter func(order *model.Order) bool) (map[string]*model.Order, error)

func (*KafkaStore) SubscribeToAllOrders

func (ks *KafkaStore) SubscribeToAllOrders(ctx context.Context, createdAfter time.Time, bufferSize int) (map[string]*model.Order, <-chan *model.Order, error)

func (*KafkaStore) Write

func (ks *KafkaStore) Write(ctx context.Context, order *model.Order) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL