// NewFastLoader makes a new fast loader and initializes it.
551247
func NewFastTeamLoader(g *libkb.GlobalContext) *FastTeamChainLoader {
	ret := &FastTeamChainLoader{
		world:           NewLoaderContextFromG(g),
		featureFlagGate: libkb.NewFeatureFlagGate(libkb.FeatureFTL, 2*time.Minute),
		storage:         NewFTLStorage(g),
	}
	return ret
}
331623
func (bu *Binutils) SetFastSymbolization(fast bool) {
	bu.update(func(r *binrep) { r.fast = fast })
}
897789
func NewRunner(steps []multistep.Step, config PackerConfig, ui packer.Ui) multistep.Runner {
	runner, _ := newRunner(steps, config, ui)
	return runner
}
740391
func NewFsLoader(fs utilfs.Filesystem, kubeletFile string) (Loader, error) {
	_, kubeletCodecs, err := kubeletscheme.NewSchemeAndCodecs()
	if err != nil {
		return nil, err
	}

	return &fsLoader{
		fs:            fs,
		kubeletCodecs: kubeletCodecs,
		kubeletFile:   kubeletFile,
	}, nil
}
59743
func NewResetTimer(init func(), done func(), d time.Duration, run, boot bool) *ResetTimer {
	rs := &ResetTimer{
		reset:    make(chan struct{}),
		kill:     make(chan struct{}),
		duration: d,
		do:       new(sync.Once),
		init:     init,
		done:     done,
		state:    0,
		started:  1,
		lock:     new(sync.Mutex),
	}

	if run {
		rs.runInit()
	}

	if boot {
		rs.handle()
	}

	return rs
}
1124030
func (j *JSONBuiltin) NewDecoder(r io.Reader) Decoder {
	return json.NewDecoder(r)
}
1341628
func (p *Plugin) Loader() (string, error) {
	templ := template.Must(template.New("provider").Parse(ftempl))

	var b bytes.Buffer
	writer := bufio.NewWriter(&b)

	err := templ.Execute(writer, p)
	writer.Flush()

	return string(b.Bytes()), err
}
1142919
func NewNonInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides) ClientConfig {
	return &DeferredLoadingClientConfig{loader: loader, overrides: overrides, icc: &inClusterClientConfig{overrides: overrides}}
}
547373
func NewCacheLoader(files []string) *CacheLoader {
	return &CacheLoader{
		files:  files,
		Logger: zap.NewNop(),
	}
}
510228
func (l loader) New(ctx context.Context, url *backend.URL) (backend.Storage, error) {
	return New(), nil
}
620176
func New(dryRun bool, maxQueueSize, maxGlobalQueueSize, concurrentTransactions int) *TxSerializer {
	return &TxSerializer{
		ConsolidatorCache:            sync2.NewConsolidatorCache(1000),
		dryRun:                       dryRun,
		maxQueueSize:                 maxQueueSize,
		maxGlobalQueueSize:           maxGlobalQueueSize,
		concurrentTransactions:       concurrentTransactions,
		log:                          logutil.NewThrottledLogger("HotRowProtection", 5*time.Second),
		logDryRun:                    logutil.NewThrottledLogger("HotRowProtection DryRun", 5*time.Second),
		logWaitsDryRun:               logutil.NewThrottledLogger("HotRowProtection Waits DryRun", 5*time.Second),
		logQueueExceededDryRun:       logutil.NewThrottledLogger("HotRowProtection QueueExceeded DryRun", 5*time.Second),
		logGlobalQueueExceededDryRun: logutil.NewThrottledLogger("HotRowProtection GlobalQueueExceeded DryRun", 5*time.Second),
		queues:                       make(map[string]*queue),
	}
}
675353
func (d DefaultJSONLoaderFactory) New(source string) JSONLoader {
	return &jsonReferenceLoader{
		fs:     osFS,
		source: source,
	}
}
1342715
func MemoryLoader(files map[string]string) Loader {
	return func(path string) (_ starlark.StringDict, src string, err error) {
		body, ok := files[path]
		if !ok {
			return nil, "", ErrNoModule
		}
		return nil, body, nil
	}
}
584542
func NewFastHTTPLoggerAdapter(logger *log.Interface) (fasthttplogger *FastHTTPLoggerAdapter) {
	fasthttplogger = &FastHTTPLoggerAdapter{
		apexLogger: *logger,
	}
	return fasthttplogger
}
1034607
func (m *Multi) AddLoaders(loaders ...jet.Loader) {
	m.loaders = append(m.loaders, loaders...)
}
947768
func NewFileLoader(root string, maxSize int64) CacheableLoader {
	return func(name string) (Cacheable, error) {
		fn := filepath.Join(root, name)
		fi, err := os.Stat(fn)
		if err != nil {
			return nil, errors.Annotate(err, ErrFileLoading, errorMessages, name)
		}
		if fi.Size() > maxSize {
			return &fileCacheable{
				name:     name,
				fullname: fn,
				tooLarge: true,
				modTime:  fi.ModTime(),
			}, nil
		}
		data, err := ioutil.ReadFile(fn)
		if err != nil {
			return nil, errors.Annotate(err, ErrFileLoading, errorMessages, name)
		}
		return &fileCacheable{
			name:     name,
			fullname: fn,
			modTime:  fi.ModTime(),
			data:     data,
		}, nil
	}
}
95702
func NewQueue() Queue {
	q := Queue{
		jobs: make([]*Package, 0),
		lock: new(sync.RWMutex),
	}

	return q
}