// SetSigHandler sets handler for the given signals.
// SIGTERM has the default handler, he returns ErrStop.
434189
func SetSigHandler(handler SignalHandlerFunc, signals ...os.Signal) {
	for _, sig := range signals {
		handlers[sig] = handler
	}
}
344393
func (s *Classifier) SetGrokClassifier(v *GrokClassifier) *Classifier {
	s.GrokClassifier = v
	return s
}
1316900
func (c *ChaincodeLogger) SetLevel(level LoggingLevel) {
	logging.SetLevel(logging.Level(level), c.logger.Module)
}
251084
func (logger *Logger) SetFormatter(formatter lg.Formatter) {
	unsafeStd := (*unsafe.Pointer)(unsafe.Pointer(&logger.std))
	old := logger.std
	logger.std.Formatter = formatter
	atomic.CompareAndSwapPointer(unsafeStd, unsafe.Pointer(old), unsafe.Pointer(logger.std))
}
19460
func (l *Logger) SetLevel(lvl Level) {
	for _, r := range l.Receivers {
		r.Level = lvl
	}
}
981165
func (p *PackageLogger) SetLevel(l LogLevel) {
	logger.Lock()
	defer logger.Unlock()
	p.level = l
}
594389
func (l *Logger) SetLevel(v string) {
	switch v {
	case "debug", "DEBUG":
		l.Level = logrus.DebugLevel
	case "info", "INFO":
		l.Level = logrus.InfoLevel
	case "warning", "WARNING":
		l.Level = logrus.WarnLevel
	case "error", "ERROR":
		l.Level = logrus.ErrorLevel
	case "fatal", "FATAL":
		l.Level = logrus.FatalLevel
	case "panic", "PANIC":
		l.Level = logrus.PanicLevel
	}
}
966422
func SetupSignalHandler(shudownFunc func(bool)) {
	//todo deal with dump goroutine stack on windows
	closeSignalChan := make(chan os.Signal, 1)
	signal.Notify(closeSignalChan,
		syscall.SIGHUP,
		syscall.SIGINT,
		syscall.SIGTERM,
		syscall.SIGQUIT)

	go func() {
		sig := <-closeSignalChan
		logutil.Logger(context.Background()).Info("got signal to exit", zap.Stringer("signal", sig))
		shudownFunc(sig == syscall.SIGQUIT)
	}()
}
462120
func (p *ProxyLB) SetSorryServer(ipaddress string, port int) {
	var pt *int
	if port > 0 {
		pt = &port
	}
	p.Settings.ProxyLB.SorryServer = ProxyLBSorryServer{
		IPAddress: ipaddress,
		Port:      pt,
	}
}
694633
func (s *Scanner) setErr(err error) {
	if s.err == nil || s.err == io.EOF {
		s.err = err
	}
}
514124
func (g *GSLB) SetSorryServer(server string) {
	g.Settings.GSLB.SorryServer = server
}
23934
func (c *Sender) SetAndRepeatError(err error, repeat int) {
	c.err = err
	c.repeatError = repeat
}
251477
func (s *MetricsFilter) SetAnd(v *MetricsAndOperator) *MetricsFilter {
	s.And = v
	return s
}
475644
func SetOther() echo.MiddlewareFunc {
	return func(next echo.HandlerFunc) echo.HandlerFunc {
		return echo.HandlerFunc(func(c echo.Context) error {
			c.Set("other", c.Get("me"))
			return next(c)
		})
	}
}
1025531
func (pn *peernet) SetConnHandler(h inet.ConnHandler) {
	pn.Lock()
	pn.connHandler = h
	pn.Unlock()
}
169706
func (he *HTTPError) SetInternal(err error) *HTTPError {
	he.Internal = err
	return he
}
960793
func (mapOp *MapOperation) SetRegister(key string, value []byte) *MapOperation {
	if mapOp.removeRegisters != nil {
		delete(mapOp.removeRegisters, key)
	}
	if mapOp.registersToSet == nil {
		mapOp.registersToSet = make(map[string][]byte)
	}
	mapOp.registersToSet[key] = value
	return mapOp
}