store

package
v0.3.37 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertEvents

func InsertEvents(ctx context.Context, db EventStore, msgs chan *model.BatchUpdate, bufferSize int,
	maxSize int, maxRows int, fatalErrors []*regexp.Regexp,
) chan []*pulsarutils.ConsumerMessageId

InsertEvents takes a channel of armada events and inserts them into the event db the events are republished to an output channel for further processing (e.g. Ackking)

func IsRetryableRedisError

func IsRetryableRedisError(err error, nonRetryableErrors []*regexp.Regexp) bool

IsRetryableRedisError returns true if the error doesn't match the list of nonRetryableErrors

func WithRetry

func WithRetry(executeDb func() error, nonRetryableErrors []*regexp.Regexp) error

Types

type EventStore

type EventStore interface {
	ReportEvents(update []*model.Event) error
}

type RedisEventStore

type RedisEventStore struct {
	// contains filtered or unexported fields
}

func (*RedisEventStore) ReportEvents

func (repo *RedisEventStore) ReportEvents(update []*model.Event) error

Jump to

Keyboard shortcuts

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