// NewMain returns a new instance of Main.
176823
func NewMain() *Main {
	return &Main{
		ServiceName: DefaultServiceName,
		Addr:        DefaultAddr,
		DataDir:     DefaultDataDir,

		Process: redis.NewProcess(),
		Logger:  log15.New("app", DefaultServiceName),

		DiscoverdClient: discoverd.DefaultClient,

		Stdin:  os.Stdin,
		Stdout: os.Stdout,
		Stderr: os.Stderr,
	}
}
893647
func New(d *deps.Deps) *Namespace {
	return &Namespace{helpers.NewDistinctLogger(d.Log.ERROR)}
}
715934
func NewBasic() *Basic {
	return &Basic{
		lock:      new(sync.Mutex),
		whitelist: map[string]bool{},
	}
}
421768
func New() (*Execution, error) {
	env, err := environment.New()
	if err != nil {
		return nil, err
	}

	dockerBinary, err := exec.LookPath(DefaultClientBinary)
	if err != nil {
		return nil, err
	}

	return &Execution{
		Execution:    *env,
		dockerBinary: dockerBinary,
	}, nil
}
1026938
func New(ctx context.Context, rootDir string, cli *containerd.Client, exitHandler ExitHandler) (*Executor, error) {
	e := &Executor{
		rootDir:     rootDir,
		exitHandler: exitHandler,
	}

	client, err := libcontainerd.NewClient(ctx, cli, rootDir, PluginNamespace, e)
	if err != nil {
		return nil, errors.Wrap(err, "error creating containerd exec client")
	}
	e.client = client
	return e, nil
}
332093
func New(defaultRuntime string,
	runtimes map[string]RuntimeHandler,
	conmonPath string,
	conmonEnv []string,
	cgroupManager string,
	containerExitsDir string,
	containerAttachSocketDir string,
	logSizeMax int64,
	logToJournald bool,
	noPivot bool,
	ctrStopTimeout int64) (*Runtime, error) {

	defRuntime, ok := runtimes[defaultRuntime]
	if !ok {
		return nil, fmt.Errorf("no runtime configured for default_runtime=%q", defaultRuntime)
	}
	if defRuntime.RuntimePath == "" {
		return nil, fmt.Errorf("empty runtime path for default_runtime=%q", defaultRuntime)
	}

	return &Runtime{
		defaultRuntime:           defRuntime,
		runtimes:                 runtimes,
		conmonPath:               conmonPath,
		conmonEnv:                conmonEnv,
		cgroupManager:            cgroupManager,
		containerExitsDir:        containerExitsDir,
		containerAttachSocketDir: containerAttachSocketDir,
		logSizeMax:               logSizeMax,
		logToJournald:            logToJournald,
		noPivot:                  noPivot,
		ctrStopTimeout:           ctrStopTimeout,
		runtimeImplList:          make(map[string]RuntimeImpl),
	}, nil
}
1071479
func New(initializer Initializer, opts ...options.Opt) *Reference {
	return NewWithData(func(interface{}) (interface{}, error) {
		return initializer()
	}, opts...)
}
1264250
func New(driver Driver, migrations []Migration, infoChan chan MigrationInfo) Darwin {
	return Darwin{
		driver:     driver,
		migrations: migrations,
		infoChan:   infoChan,
	}
}
371695
func New(name string) (s *Application) {
	s = NewWithContext(name, nil)
	globalApp[name] = s
	return
}
1209504
func NewMain() (*Main, error) {
	return &Main{
		Index:           "ssb",
		ReadConcurrency: 1,
		MapConcurrency:  4,
		RecordBuf:       1000000,

		nexter: pdk.NewNexter(),
	}, nil
}
1319966
func New(o *rules.Options) *Parser {
	if o == nil {
		return &Parser{options: defaultOptions}
	}
	return &Parser{options: o}
}
324394
func NewInstancer(
	name string,
	ttl time.Duration,
	logger log.Logger,
) *Instancer {
	return NewInstancerDetailed(name, time.NewTicker(ttl), net.LookupSRV, logger)
}
111499
func New(pid int) *Process {
	dbp := &Process{
		pid:            pid,
		threads:        make(map[int]*Thread),
		breakpoints:    proc.NewBreakpointMap(),
		firstStart:     true,
		os:             new(OSProcessDetails),
		ptraceChan:     make(chan func()),
		ptraceDoneChan: make(chan interface{}),
		bi:             proc.NewBinaryInfo(runtime.GOOS, runtime.GOARCH),
	}
	go dbp.handlePtraceFuncs()
	return dbp
}
936048
func New(exec utilexec.Interface) Interface {
	runner := &runner{
		exec: exec,
	}
	return runner
}
1094512
func NewConn(c net.Conn) net.Conn {
	return NewConnWith(stats.DefaultEngine, c)
}
527384
func New(session *session.Session) *Lambda {
	fmt.Printf("\n")
	return &Lambda{
		Lambda: lambda.New(session),
	}
}
1175191
func New() (*Conn, error) {
	c := new(Conn)

	if err := c.initConnection(); err != nil {
		return nil, err
	}

	return c, nil
}