delegate

package
v0.0.0-...-26ab6e5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitterMiddleware

type CommitterMiddleware[I comparable, T boltzmann.Identifiable[I]] struct {
	StateService state.Service[T]
	Next         Delegate[T]
}

CommitterMiddleware is an implementation of Delegate that commits the state of executed process.

func (CommitterMiddleware[I, T]) Execute

func (c CommitterMiddleware[I, T]) Execute(ctx context.Context, arg T) error

type Delegate

type Delegate[T any] interface {
	// Execute executes the underlying task(s).
	Execute(ctx context.Context, arg T) error
}

Delegate is a function/routine interface executed by executor.Executor(s) instances.

type LockingMiddleware

type LockingMiddleware[I comparable, T boltzmann.Identifiable[I]] struct {
	Lock lock.Lock
	Next Delegate[T]
}

LockingMiddleware is an implementation of Delegate that performs concurrency-locking mechanisms for each process execution.

func (LockingMiddleware[I, T]) Execute

func (d LockingMiddleware[I, T]) Execute(ctx context.Context, arg T) (err error)

type Recoverer

type Recoverer[I comparable, T boltzmann.Identifiable[I]] struct {
}

func (Recoverer[I, T]) Execute

func (r Recoverer[I, T]) Execute(ctx context.Context, item T) error

Jump to

Keyboard shortcuts

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