This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package limiter | |
import ( | |
"errors" | |
"time" | |
) | |
type Limiter struct { | |
timeout time.Duration | |
ch chan struct{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package executor | |
type ExecHandler[T any] func(T) | |
type Executor[T any] struct { | |
reader chan T | |
writer chan T | |
buffer []T | |
execHandler ExecHandler[T] | |
} |