summaryrefslogtreecommitdiffstats
path: root/library/Icingadb/Command/Transport/CommandTransportInterface.php
blob: ad07cb904ec368961276cf175f365640f72077a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

/* Icinga DB Web | (c) 2021 Icinga GmbH | GPLv2 */

namespace Icinga\Module\Icingadb\Command\Transport;

use Icinga\Module\Icingadb\Command\IcingaCommand;

/**
 * Interface for Icinga command transports
 */
interface CommandTransportInterface
{
    /**
     * Send an Icinga command over the Icinga command transport
     *
     * @param   IcingaCommand   $command    The command to send
     * @param   int|null        $now        Timestamp of the command or null for now
     *
     * @throws  CommandTransportException If sending the Icinga command failed
     */
    public function send(IcingaCommand $command, int $now = null);
}