Horizon Official Technical Documentation
Server.hpp File Reference
#include "Core/Logging/Logger.hpp"
#include "Core/Multithreading/LockedLookupTable.hpp"
#include "System.hpp"
#include <boost/lexical_cast.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/random_generator.hpp>
#include <queue>
#include <boost/mysql/error_with_diagnostics.hpp>
#include <boost/mysql/handshake_params.hpp>
#include <boost/mysql/results.hpp>
#include <boost/mysql/tcp_ssl.hpp>
#include <boost/asio/io_context.hpp>
#include <boost/asio/ip/tcp.hpp>
#include <boost/asio/ssl/context.hpp>
#include <boost/system/system_error.hpp>
#include <boost/chrono.hpp>
#include "Server/Common/Configuration/ServerConfiguration.hpp"
#include <sol/sol.hpp>
#include <thread>
+ Include dependency graph for Server.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  s_segment_storage< Key, Value >
 
class  SharedPriorityResourceMedium< Storage >
 
class  SharedPriorityResourceManager< SharedPriorityResourceMediums >
 
class  KernelComponent
 
class  CLICommand
 
class  CommandLineProcess
 
class  DatabaseProcess
 
struct  kernel_component_state_holder
 
class  Kernel
 
class  Server
 

Macros

#define TERMINAL_STR   "Horizon $> "
 

Typedefs

typedef std::map< std::string, kernel_component_state_holderKernelComponents
 

Enumerations

enum  shutdown_stages { SHUTDOWN_NOT_STARTED = 0 , SHUTDOWN_INITIATED = 1 , SHUTDOWN_CLEANUP_COMPLETE = 2 , SHUTDOWN_COMPLETE = 3 }
 
enum  kernel_resource_priority_type {
  RESOURCE_PRIORITY_PRIMARY = 0 , RESOURCE_PRIORITY_SECONDARY = 1 , RESOURCE_PRIORITY_TERTIARY = 2 , RESOURCE_PRIORITY_QUATERNARY = 3 ,
  RESOURCE_PRIORITY_QUINARY = 4 , RESOURCE_PRIORITY_SENARY = 5 , RESOURCE_PRIORITY_SEPTENARY = 6 , RESOURCE_PRIORITY_OCTONARY = 7 ,
  RESOURCE_PRIORITY_NONARY = 8 , RESOURCE_PRIORITY_DENARY = 9 , MAX_KERNEL_SEGMENT_PRIORITIES = 10
}
 

Functions

void set_shutdown_signal (int signal)
 
shutdown_stages get_shutdown_stage ()
 
void set_shutdown_stage (shutdown_stages new_stage)
 

Variables

std::atomic< shutdown_stages_shutdown_stage
 
std::atomic< int > _shutdown_signal
 

Macro Definition Documentation

◆ TERMINAL_STR

#define TERMINAL_STR   "Horizon $> "

Typedef Documentation

◆ KernelComponents

typedef std::map<std::string, kernel_component_state_holder> KernelComponents

Enumeration Type Documentation

◆ kernel_resource_priority_type

Enumerator
RESOURCE_PRIORITY_PRIMARY 
RESOURCE_PRIORITY_SECONDARY 
RESOURCE_PRIORITY_TERTIARY 
RESOURCE_PRIORITY_QUATERNARY 
RESOURCE_PRIORITY_QUINARY 
RESOURCE_PRIORITY_SENARY 
RESOURCE_PRIORITY_SEPTENARY 
RESOURCE_PRIORITY_OCTONARY 
RESOURCE_PRIORITY_NONARY 
RESOURCE_PRIORITY_DENARY 
MAX_KERNEL_SEGMENT_PRIORITIES 
78{
90};
@ RESOURCE_PRIORITY_SECONDARY
Definition: Server.hpp:80
@ RESOURCE_PRIORITY_DENARY
Definition: Server.hpp:88
@ RESOURCE_PRIORITY_SENARY
Definition: Server.hpp:84
@ RESOURCE_PRIORITY_OCTONARY
Definition: Server.hpp:86
@ RESOURCE_PRIORITY_SEPTENARY
Definition: Server.hpp:85
@ RESOURCE_PRIORITY_PRIMARY
Definition: Server.hpp:79
@ RESOURCE_PRIORITY_TERTIARY
Definition: Server.hpp:81
@ RESOURCE_PRIORITY_NONARY
Definition: Server.hpp:87
@ MAX_KERNEL_SEGMENT_PRIORITIES
Definition: Server.hpp:89
@ RESOURCE_PRIORITY_QUINARY
Definition: Server.hpp:83
@ RESOURCE_PRIORITY_QUATERNARY
Definition: Server.hpp:82

◆ shutdown_stages

Enumerator
SHUTDOWN_NOT_STARTED 
SHUTDOWN_INITIATED 
SHUTDOWN_CLEANUP_COMPLETE 
SHUTDOWN_COMPLETE 
63{
68};
@ SHUTDOWN_COMPLETE
Definition: Server.hpp:67
@ SHUTDOWN_NOT_STARTED
Definition: Server.hpp:64
@ SHUTDOWN_CLEANUP_COMPLETE
Definition: Server.hpp:66
@ SHUTDOWN_INITIATED
Definition: Server.hpp:65

Function Documentation

◆ get_shutdown_stage()

◆ set_shutdown_signal()

void set_shutdown_signal ( int  signal)
inline
73{ _shutdown_signal.exchange(signal); }
std::atomic< int > _shutdown_signal
Definition: Server.cpp:51

References _shutdown_signal.

Referenced by BOOST_AUTO_TEST_CASE(), CommandLineProcess::cli_thread_start(), CommandLineProcess::clicmd_shutdown(), and SignalHandler().

+ Here is the caller graph for this function:

◆ set_shutdown_stage()

void set_shutdown_stage ( shutdown_stages  new_stage)
inline

Variable Documentation

◆ _shutdown_signal

std::atomic<int> _shutdown_signal
extern

Referenced by set_shutdown_signal().

◆ _shutdown_stage

std::atomic<shutdown_stages> _shutdown_stage
extern