Documentation ¶
Index ¶
- func CreateWorkers(ctx context.Context, n int, opt WorkersOpt) ([]chan<- tasks.ReadFile, *errgroup.Group)
- func RoundRobin[T any](ts []T) func() T
- func TrySync(ctx context.Context, workers []chan<- tasks.ReadFile) error
- func WarmUpFooters(glob string, sendToWorker sendFileHook) error
- func WarmUpWholeFile(glob string, sendToWorker sendFileHook) error
- type Config
- type ExecContext
- type StatedFile
- type WorkersOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWorkers ¶
func RoundRobin ¶
func RoundRobin[T any](ts []T) func() T
func WarmUpFooters ¶
func WarmUpWholeFile ¶
Types ¶
type ExecContext ¶
type ExecContext struct {
// contains filtered or unexported fields
}
func New ¶
func New(config Config) *ExecContext
func (*ExecContext) RunAndClose ¶
func (execCtx *ExecContext) RunAndClose(ctx context.Context) error
type StatedFile ¶
func StatFilesByGlob ¶
func StatFilesByGlob(glob string) ([]StatedFile, error)
type WorkersOpt ¶
type WorkersOpt struct { ObserveTotalSize *uint64 RateLimitInMiB float64 OnStep worker.OnStepHook }
Click to show internal directories.
Click to hide internal directories.