Documentation ¶
Index ¶
- Variables
- func Deduplicate[T comparable](in <-chan T, window time.Duration) <-chan T
- func Filter[T ProgressAwareTarget](t T, evts []event.Event) ([]event.Event, error)
- func PeriodicJobTicker(ctx context.Context, d time.Duration, s projection.Schedule, ...) <-chan error
- func PeriodicJobTickerFunc(ctx context.Context, d time.Duration, s projection.Schedule, ...) <-chan error
- func Use[T ProgressAwareTarget](j projection.Job, newFn func(context.Context) (T, error), ...) error
- type ContextKey
- type Group
- type Groups
- type ProgressAwareTarget
- type ProjectionProgressor
- type Projector
- type Registerer
- type Scheduler
- type Schedules
- type Starter
- type Worker
- type WorkerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContextKeyJobName = ContextKey("name") ContextKeyId = ContextKey("id") ContextKeyRunId = ContextKey("run-id") )
View Source
var (
ErrNotFound = errors.New("projection not found")
)
Functions ¶
func Deduplicate ¶ added in v0.0.28
func Deduplicate[T comparable](in <-chan T, window time.Duration) <-chan T
func PeriodicJobTicker ¶ added in v0.0.28
func PeriodicJobTickerFunc ¶ added in v0.0.39
Types ¶
type ContextKey ¶ added in v0.0.3
type ContextKey string
type Group ¶ added in v0.0.28
type Group[K comparable, V any] struct { Key K Value []V }
func GroupByFunc ¶ added in v0.0.28
type Groups ¶ added in v0.0.33
type Groups[K comparable, V any] []Group[K, V]
type ProgressAwareTarget ¶ added in v0.0.28
type ProjectionProgressor ¶ added in v0.0.28
type ProjectionProgressor struct { *projection.Progressor // contains filtered or unexported fields }
func NewProgressor ¶ added in v0.0.28
func NewProgressor() *ProjectionProgressor
func (*ProjectionProgressor) Dirty ¶ added in v0.0.28
func (p *ProjectionProgressor) Dirty() bool
func (*ProjectionProgressor) SetProgress ¶ added in v0.0.28
func (p *ProjectionProgressor) SetProgress(t time.Time, ids ...uuid.UUID)
type Registerer ¶
type Scheduler ¶ added in v0.0.13
type Scheduler struct { Schedule projection.Schedule StartupOptions []projection.SubscribeOption }
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) Start ¶
func (svc *Worker) Start(ctx context.Context, opts ...projection.SubscribeOption) (<-chan error, error)
type WorkerOption ¶
type WorkerOption func(*Worker)
func WithErrorFunc ¶ added in v0.0.3
func WithErrorFunc(fn func(projection.Job, error)) WorkerOption
func WithLogger ¶
func WithLogger(logger *zap.SugaredLogger) WorkerOption
Source Files ¶
Click to show internal directories.
Click to hide internal directories.