// New implements backend.StorageLoader
510228
func (l loader) New(ctx context.Context, url *backend.URL) (backend.Storage, error) {
	return New(), nil
}
156828
func New(r *NetIDRange, allocatorFactory allocator.AllocatorFactory) *Allocator {
	return &Allocator{
		netIDRange: r,
		alloc:      allocatorFactory(int(r.Size), r.String()),
	}
}
808707
func New() db.FileSystem {
	return &fileSystem{
		root: &node{
			children: make(map[string]*node),
			isDir:    true,
		},
	}
}
171594
func New(options ...Option) (Cache, error) {
	c := &cache{
		id:       identifier.NewUUID().String(),
		interval: time.Minute,
		ttl:      10 * time.Minute,
		buckets:  make(map[string]*bucket),
		taskc:    make(chan task),
		lenc:     make(chan chan int),
	}
	for _, option := range options {
		if err := option(c); err != nil {
			return nil, errors.Annotate(err, ErrSettingOptions, errorMessages)
		}
	}
	if c.load == nil {
		return nil, errors.New(ErrNoLoader, errorMessages)
	}
	c.backend = loop.Go(c.backendLoop, "cache", c.id)
	return c, nil
}
914428
func New(enabled bool, addr, prefix string) (Backend, error) {
	client, err := statsd.New(addr, statsd.WithPrefix(prefix), statsd.Mute(!enabled))
	b := Backend{client}
	return b, err
}
1100111
func New() *Driver {
	return &Driver{
		baseEmbed: baseEmbed{
			Base: base.Base{
				StorageDriver: &driver{
					root: &dir{
						common: common{
							p:   "/",
							mod: time.Now(),
						},
					},
				},
			},
		},
	}
}
897677
func (f FileSystemJSONLoaderFactory) New(source string) JSONLoader {
	return &jsonReferenceLoader{
		fs:     f.fs,
		source: source,
	}
}
970408
func New(authToken, parentDir string, limit int,
	updadeSearchSession func(string), triggerRender func()) *js.Object {
	parentDirbr, ok := blob.Parse(parentDir)
	if !ok {
		dom.GetWindow().Alert(fmt.Sprintf("invalid parentDir blobRef: %q", parentDir))
		return nil
	}
	return js.MakeWrapper(&Query{
		ParentDir:           parentDirbr,
		AuthToken:           authToken,
		UpdateSearchSession: updadeSearchSession,
		TriggerRender:       triggerRender,
		Limit:               limit,
	})
}
765484
func New(db *bolt.DB, rootBucket string, opts ...Option) (*Store, error) {
	if db.IsReadOnly() {
		return nil, ErrDBReadOnly
	}
	bucket := []byte(rootBucket)

	err := db.Update(func(tx *bolt.Tx) error {
		// create root
		root, err := tx.CreateBucketIfNotExists(bucket)
		if err != nil {
			return err
		}
		// create the buckets inside the root
		for _, b := range [][]byte{
			tasksPath, orgsPath, taskMetaPath,
			orgByTaskID, nameByTaskID, runIDs,
		} {
			_, err := root.CreateBucketIfNotExists(b)
			if err != nil {
				return err
			}
		}
		return nil
	})
	if err != nil {
		return nil, err
	}
	st := &Store{db: db, bucket: bucket, idGen: snowflake.NewDefaultIDGenerator(), minLatestCompleted: math.MinInt64}
	for _, opt := range opts {
		opt(st)
	}
	return st, nil
}
853100
func New(client *docker.Client, conf *config.Config, logger *log.Logger) *API {
	return &API{client, conf, logger, nil}
}
856963
func New(loader Loader) *Env {
	if loader == nil {
		loader = &StringLoader{}
	}
	return &Env{loader, make(map[string]Func), make(map[string]Filter), make(map[string]Test), make([]parse.NodeVisitor, 0)}
}
818679
func New(params *stripe.FileParams) (*stripe.File, error) {
	return getC().New(params)
}
811996
func New(dir string) *Store {
	if d, err := filepath.EvalSymlinks(dir); err == nil {
		dir = d
	}
	return &Store{
		path: dir,
	}
}
327767
func New(ln Listener, c *StoreConfig) *Store {
	logger := c.Logger
	if logger == nil {
		logger = log.New(os.Stderr, "[store] ", log.LstdFlags)
	}

	return &Store{
		ln:             ln,
		raftDir:        c.Dir,
		raftID:         c.ID,
		dbConf:         c.DBConf,
		dbPath:         filepath.Join(c.Dir, sqliteFile),
		randSrc:        rand.New(rand.NewSource(time.Now().UnixNano())),
		conns:          make(map[uint64]*Connection),
		done:           make(chan struct{}, 1),
		meta:           make(map[string]map[string]string),
		logger:         logger,
		ApplyTimeout:   applyTimeout,
		connPollPeriod: connectionPollPeriod,
	}
}
841001
func New(files Files) (vfs.FileSystem, error) {
	fs := make(MapFS)

	for path, file := range files {
		if err := fs.addFile(path, file); err != nil {
			return nil, err
		}
	}

	return fs, nil
}
664719
func New() *DefaultLoader {
	loader := MultiLoader(
		&TagLoader{},
		&EnvironmentLoader{},
		&FlagLoader{},
	)

	d := &DefaultLoader{}
	d.Loader = loader
	d.Validator = MultiValidator(&RequiredValidator{})
	return d
}
1217051
func New(maxBytes int64, cache, origin blobserver.Storage) *Storage {
	sto := &Storage{
		origin:        origin,
		cache:         cache,
		lru:           lru.NewUnlocked(0),
		maxCacheBytes: maxBytes,
	}
	return sto
}