** Copyright (C) 2001-2023 Zabbix SIA
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
** 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 General Public License for more details.
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
"git.zabbix.com/ap/plugin-support/log"
"git.zabbix.com/ap/plugin-support/plugin"
var hostnames = map[uint64]string{}
type PerformTask func(key string, timeout time.Duration, clientID uint64) (result string, err error)
var performTask PerformTask
func SetHostname(clientID uint64, hostname string) {
hostnames[clientID] = hostname
func getHostname(clientID uint64) string {
return hostnames[clientID]
func SetPerformTask(f PerformTask) {
func processConfigItem(timeout time.Duration, name, value, item string, length int, clientID uint64) (string, error) {