// Exiter configures a function that will be called to exit the app.
335785
func Exiter(fn func(int)) error {
	log.Exiter = fn
	err := log.Init(string(log.Log.Domain), numLogs)
	if err != nil {
		return e.Forward(err)
	}
	return nil
}
688706
func (n *NotifyRouter) HandleAppExit() {
	if n == nil {
		return
	}
	n.G().Log.Debug("+ Sending app exit notification")
	n.cm.ApplyAll(func(id ConnectionID, xp rpc.Transporter) bool {
		if n.getNotificationChannels(id).App {
			go func() {
				(keybase1.NotifyAppClient{
					Cli: rpc.NewClient(xp, NewContextifiedErrorUnwrapper(n.G()), nil),
				}).Exit(context.Background())
			}()
		}
		return true
	})
	n.G().Log.Debug("- Sent app exit notification")
}
487379
func (e Error) AppendErr(err error) Error {
	return e.Append(err.Error())
}
866263
func (t *Tree) endControl() Node {
	return t.newEnd(t.expect(itemRightDelim, "end").pos)
}
337279
func Exitf(format string, args ...interface{}) {
	zap.S().Errorf(format, args...)
	os.Exit(1)
}
737217
func (c *Client) Exited() bool {
	c.l.Lock()
	defer c.l.Unlock()
	return c.exited
}
1315831
func (p *pathObject) SaveR(call goja.FunctionCall) goja.Value {
	return p.save(call, true, false)
}
134507
func Exitf(format string, args ...interface{}) {
	Global.intLogf(ERROR, format, args...)
	Global.Close() // so that hopefully the messages get logged
	os.Exit(0)
}
413555
func (t *Template) endControl() Node {
	return t.newEnd(t.expect(itemRightDelim, "end").pos)
}
1170148
func NewConfigurator(config Config, logger *log.Logger) (*Configurator, error) {
	c := &Configurator{logger: logger}
	err := c.Update(config)
	if err != nil {
		return nil, err
	}
	return c, nil
}
473094
func exitWithError(err error) {
	fmt.Fprintf(os.Stderr, "\n%v\n", err)
	os.Exit(1)
}
1059359
func ClosedHandler(cb ConnHandler) Option {
	return func(o *Options) error {
		o.ClosedCB = cb
		return nil
	}
}
1286646
func leaveCluster(d *Daemon, w http.ResponseWriter, r *http.Request) *HttpErr {
	log.Println("Node leave cluster")
	d.clusterChan <- &NodeCtx{"", nodeLeave}

	return nil
}
675325
func ConfigureLimiter(lc *limiter.LimiterConfig) {
	lc.MaxConnections = LimiterMaxConnections
	lc.MaxNumberOfUsers = LimiterMaxConcurrentUsers
}
487732
func (e *ExitError) Error() string {
	return fmt.Sprintf("%s : exit code %d", e.Name, e.Code)
}
393523
func (e *Exit) Exit(code int) {
	e.status = code
	e.exit(code)
}
714861
func ConfigureLogger(l *log.Logger) {
	level := log.InfoLevel
	if LogVerbose {
		level = log.DebugLevel
	} else if LogVeryQuiet {
		level = log.ErrorLevel
	} else if LogQuiet {
		level = log.WarnLevel
	}
	l.SetLevel(level)
	if LogFile != "" {
		pathmap := make(lfshook.PathMap)
		for i := 0; i < 256; i++ {
			pathmap[log.Level(i)] = LogFile
		}
		hook := lfshook.NewHook(pathmap)
		hook.SetFormatter(newLogFormatter())
		l.AddHook(hook)
	}
}