Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultAsyncStats is the default maximum number of async stats to be issued // when WithAsyncStats is not specified. DefaultAsyncStats = 100 // DefaultAsyncThreshold is the default value for the number of directory // entries that must be present before async stats are used when // WithAsyncThreshold is not specified. DefaultAsyncThreshold = 10 )
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type ErrorLogger ¶
ErrorLogger is the type of function called when a Stat or Lstat return an error.
type LatencyTracker ¶
LatencyTracker is used to track the latency of Stat or Lstat operations.
type Option ¶
type Option func(*options)
Option is used to configure an asyncstat.T.
func WithAsyncStats ¶
WithAsyncStats sets the total number of asynchronous stats to be issued. The default is DefaultAsyncStats.
func WithAsyncThreshold ¶
WithAsyncThreshold sets the threshold at which asynchronous stats are used, any directory with less than number of entries will be processed synchronously. The default is DefaultAsyncThreshold.
func WithErrorLogger ¶
func WithErrorLogger(fn ErrorLogger) Option
WithErrorLogger sets the function to be called when an error is returned by Stat or Lstat.
func WithLStat ¶
func WithLStat() Option
WithLStat requests that fs.LStat be used instead of fs.Stat. This is the default.
func WithLatencyTracker ¶
func WithLatencyTracker(lt LatencyTracker) Option
WithLatencyTracker sets the latency tracker to be used.
type T ¶
type T struct {
// contains filtered or unexported fields
}
T provides support for issuing asynchronous stat or lstat calls.
func (*T) Configuration ¶
func (is *T) Configuration() Configuration