** Copyright (C) 2001-2025 Zabbix SIA
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
"golang.zabbix.com/sdk/conf"
"golang.zabbix.com/sdk/errs"
"golang.zabbix.com/sdk/log"
"golang.zabbix.com/sdk/plugin"
"golang.zabbix.com/sdk/plugin/comms"
_ plugin.Runner = (*Plugin)(nil)
_ plugin.Configurator = (*Plugin)(nil)
_ plugin.Exporter = (*Plugin)(nil)
// startLock is used to ensure that only one plugin is started at a time.
// view startPlugin method for more details.
var startLock sync.Mutex //nolint:gochecknoglobals
// Plugin represents an external plugin.
name string // name of plugin
cmdWait chan error // cmd.Wait() result
pluginStopped chan struct{} // triggered by plugin.Stop() request
// NewPlugin created a new external plugin accessor instance.