cluck 1.0.1
The cluster lock service.
messenger.h
Go to the documentation of this file.
1// Copyright (c) 2016-2025 Made to Order Software Corp. All Rights Reserved
2//
3// https://snapwebsites.org/project/cluck
4// contact@m2osw.com
5//
6// This program is free software: you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// This program is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14// GNU General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with this program. If not, see <https://www.gnu.org/licenses/>.
18#pragma once
19
20// fluid-settings
21//
22#include <fluid-settings/fluid_settings_connection.h>
23
24
25
26namespace cluck_daemon
27{
28
29
30
31class cluckd;
32
33
35 : public fluid_settings::fluid_settings_connection
36{
37public:
38 typedef std::shared_ptr<messenger> pointer_t;
39
40 messenger(cluckd * c, advgetopt::getopt & opts);
41 messenger(messenger const &) = delete;
42 virtual ~messenger() override;
43
44 messenger & operator = (messenger const &) = delete;
45
46 void finish_parsing();
47
48 // ed::connection_with_send_message implementation
49 virtual void ready(ed::message & msg);
50 virtual void stop(bool quitting);
51
52 // fluid_settings::fluid_settings_connection() implementation
53 virtual void fluid_settings_changed(
54 fluid_settings::fluid_settings_status_t status
55 , std::string const & name
56 , std::string const & value) override;
57
58private:
59 cluckd * f_cluckd = nullptr;
60};
61
62
63
64} // namespace cluck_deamon
65// vim: ts=4 sw=4 et
Class handling intercomputer locking.
Definition cluckd.h:48
Handle messages from the communicatord.
Definition messenger.h:36
virtual void ready(ed::message &msg)
Messenger received the READY message.
std::shared_ptr< messenger > pointer_t
Definition messenger.h:38
messenger & operator=(messenger const &)=delete
void finish_parsing()
Finish handling command line options.
virtual ~messenger() override
messenger(messenger const &)=delete
virtual void stop(bool quitting)
Let the server know STOP or QUITTING was sent to us.
virtual void fluid_settings_changed(fluid_settings::fluid_settings_status_t status, std::string const &name, std::string const &value) override
Send the CLUSTER_STATUS to communicatord once ready.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.