idempotency

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package idempotency integrates occurrence ownership with idempotency.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidConfiguration reports missing or unsafe wrapper dependencies.
	ErrInvalidConfiguration = errors.New("scheduler idempotency: invalid configuration")
	// ErrOccurrenceConflict reports an occurrence owned by incompatible work.
	ErrOccurrenceConflict = errors.New("scheduler idempotency: occurrence conflict")
)

Functions

This section is empty.

Types

type Executor

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

Executor deduplicates schedule occurrences before invoking another executor.

func New

func New(store goidempotency.Store, inner scheduler.Executor, options Options) (*Executor, error)

New constructs an occurrence-deduplicating executor.

func (*Executor) Execute

func (executor *Executor) Execute(ctx context.Context, scheduled scheduler.Context) error

Execute acquires occurrence ownership and completes it after successful work.

type Options

type Options struct {
	Tenant string
	Lease  time.Duration
}

Options configures the tenant namespace and ownership lease.

Jump to

Keyboard shortcuts

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