Signed-off-by: joshvanl <me@joshvanl.dev>
This commit is contained in:
joshvanl 2025-04-22 13:56:34 -03:00
parent b1c323eb83
commit 0032beeca8
2 changed files with 1 additions and 7 deletions

View File

@ -15,9 +15,6 @@ package loop
import (
"context"
"sync/atomic"
"github.com/dapr/kit/concurrency/fifo"
)
type HandlerFunc[T any] func(context.Context, T) error
@ -31,8 +28,6 @@ type Loop[T any] struct {
handler HandlerFunc[T]
closeCh chan struct{}
closed atomic.Bool
lock fifo.Mutex
}
func New[T any](opts Options[T]) *Loop[T] {

View File

@ -18,7 +18,6 @@ import (
"sync/atomic"
"time"
"k8s.io/utils/clock"
kclock "k8s.io/utils/clock"
)
@ -45,7 +44,7 @@ type Processor[K comparable, T Queueable[K]] struct {
func NewProcessor[K comparable, T Queueable[K]](opts Options[K, T]) *Processor[K, T] {
cl := opts.Clock
if cl == nil {
cl = clock.RealClock{}
cl = kclock.RealClock{}
}
return &Processor[K, T]{
executeFn: opts.ExecuteFn,