INNER CODE UNIT · Go
StopAllPipelines
alibaba/loongcollector · plugin_main/plugin_export.go:231
func StopAllPipelines(withInputFlag int) {
logger.Info(context.Background(), "Stop all", "start", "with input", withInputFlag)
err := pluginmanager.StopAllPipelines(withInputFlag != 0)
if err != nil {
logger.Error(context.Background(), selfmonitor.PluginAlarm, "stop all error", err)
}
logger.Info(context.Background(), "Stop all", "success", "with input", withInputFlag)
// Stop with input first, without input last.
if withInputFlag == 0 {
logger.Info(context.Background(), "logger", "close and recover")
logger.Flush()
logger.Close()
}
}
//export Stop
func Stop(configName string, removedFlag int) {
logger.Info(context.Background(), "Stop", "start", "config", configName, "removed", removedFlag)