internal

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package internal contains internal logic.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeGoroutineOffsets

func ComputeGoroutineOffsets(totalBytes, maxGoroutines, minBytesReadByAGoroutine int) [][2]int

ComputeGoroutineOffsets computes how many goroutines will handle totalBytes, and their [start, end] offset intervals. First arguments represents the total bytes to be handled. Second argument represents the maximum goroutines that will handle total bytes. Third argument represents the minimum bytes a goroutine should handle. It returns a slice (up to maxGoroutines in length) of [start, end] intervals each goroutine should handle.

Types

type Logger

type Logger interface {
	// Debug logs debug information.
	Debug(keyValues ...interface{})
	// Error logs any error occurred.
	Error(keyValues ...interface{})
}

Logger logs information while processing a CSV file.

type NopLogger

type NopLogger struct{}

NopLogger does not log anything.

func (NopLogger) Debug

func (NopLogger) Debug(...interface{})

Debug does nothing.

func (NopLogger) Error

func (NopLogger) Error(...interface{})

Error does nothing.

Jump to

Keyboard shortcuts

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