E2SAR 0.3.0
Loading...
Searching...
No Matches
e2sar Namespace Reference

Data Structures

class  Affinity
 
struct  E2SARErrorInfo
 
class  E2SARException
 
class  EjfatURI
 
struct  FloatSample
 
struct  IntegerSample
 
union  LBHdrU
 
struct  LBHdrV2
 
struct  LBHdrV3
 
class  LBManager
 
struct  LBREHdr
 
struct  LBStatus
 
class  NetUtil
 
class  Optimizations
 
struct  OverviewEntry
 
struct  pair_equal
 
struct  pair_hash
 
class  Reassembler
 
struct  REHdr
 
class  Segmenter
 
struct  SyncHdr
 
struct  TimeseriesData
 
struct  TimeseriesResult
 
struct  TokenDetails
 
struct  TokenPermission
 
struct  WorkerStats
 

Typedefs

using TimeUntil = google::protobuf::Timestamp
 
using OverviewMessage = std::vector<OverviewEntry>
 
using TokenSelector = std::variant<uint32_t, std::string>
 
template<class T >
using result = outcome::result<T, E2SARErrorInfo>
 
using EventNum_t = u_int64_t
 
using UnixTimeNano_t = u_int64_t
 
using UnixTimeMicro_t = u_int64_t
 
using EventRate_t = u_int32_t
 
typedef sinks::asynchronous_sink< sinks::text_ostream_backend > text_sink
 
using OptimizationsWord = u_int16_t
 

Enumerations

enum class  E2SARErrorc {
  NoError = 0 , CaughtException = 1 , ParseError = 2 , ParameterError = 3 ,
  ParameterNotAvailable = 4 , OutOfRange = 5 , Undefined = 6 , NotFound = 7 ,
  RPCError = 8 , SocketError = 9 , MemoryError = 10 , LogicError = 11 ,
  SystemError = 12 , DataError = 13
}
 

Functions

const std::string & get_Version ()
 
std::error_code make_error_code (e2sar::E2SARErrorc e)
 
std::error_code make_error_code (E2SARErrorInfo e)
 
boost::exception_ptr make_exception_ptr (E2SARErrorInfo e)
 
struct e2sar::REHdr __attribute__ ((__packed__))
 
constexpr size_t getIPHeaderLength (bool useIPv6)
 
constexpr size_t getTotalHeaderLength (bool useIPv6)
 
template<typename Container >
std::string concatWithSeparator (const Container &c, const std::string &sep=","s)
 
void busyWaitUsecs (const boost::chrono::steady_clock::time_point &tp, int64_t usecs)
 
std::string expandTilde (const std::string &path)
 
void defineClogLogger ()
 
result< std::string > read_file (std::string_view path)
 
template<class X >
boost::tuple< X, X, X > pid (const X &setPoint, const X &prcsVal, const X &delta_t, const X &Kp, const X &Ki, const X &Kd, const X &prev_err, const X &prev_integral)
 
bool operator== (const EjfatURI &u1, const EjfatURI &u2)
 

Variables

const std::string E2SARVersion {E2SAR_VERSION}
 
const size_t RECV_BUFFER_SIZE {9000}
 
constexpr u_int8_t rehdrVersion = 1
 
constexpr u_int8_t rehdrVersionNibble = rehdrVersion << 4
 
constexpr u_int8_t lbhdrVersion2 = 2
 
constexpr u_int8_t lbhdrVersion3 = 3
 
constexpr u_int8_t synchdrVersion2 = 2
 
constexpr size_t IPV4_HDRLEN = 20
 
constexpr size_t IPV6_HDRLEN = 40
 
constexpr size_t UDP_HDRLEN = 8
 
constexpr size_t IP_HDRLEN = IPV4_HDRLEN
 
constexpr size_t TOTAL_HDR_LEN {IP_HDRLEN + UDP_HDRLEN + sizeof(LBHdrV2) + sizeof(REHdr)}
 
boost::shared_ptr< text_sink > sink = boost::make_shared<text_sink>()
 
sources::severity_logger_mt< trivial::severity_level > lg
 
const u_int16_t DATAPLANE_PORT = 19522
 

Detailed Description

This file defines error codes for E2SAR and plugs the error code classes into system::error_code such that E2SAR functions can return result objects (either result or error code)

Typedef Documentation

◆ TimeUntil

using e2sar::TimeUntil = google::protobuf::Timestamp

The LBManager knows how to speak to load balancer control plane over gRPC. It can be run from Segmenter, Reassembler or a third party like the workflow manager. This is used to specify for how long the loadbalancer is needed use google::protobuf::util::FromString(string, TimeStamp*) to convert from RFC 3339 string like "1972-01-01T10:00:20.021Z" or "1972-01-01T10:00:20.021-05:00"

◆ TokenSelector

using e2sar::TokenSelector = std::variant<uint32_t, std::string>

Token selector - select a token by ID or token string Uses std::variant instead of loadbalancer::TokenSelector protobuf

Enumeration Type Documentation

◆ E2SARErrorc

enum class e2sar::E2SARErrorc
strong

error codes (in addition to standard std::errc error codes)

Function Documentation

◆ defineClogLogger()

void e2sar::defineClogLogger ( )

Define a std::clog-based logger

◆ expandTilde()

std::string e2sar::expandTilde ( const std::string & path)

Expand tilde (~) in file paths to home directory. Only supports ~/path format (not ~username/path). Falls back to original path if HOME environment variable is not set.

◆ pid()

template<class X >
boost::tuple< X, X, X > e2sar::pid ( const X & setPoint,
const X & prcsVal,
const X & delta_t,
const X & Kp,
const X & Ki,
const X & Kd,
const X & prev_err,
const X & prev_integral )

Function implementing a PID computation. Returns a pair of <PID, Current Error>

◆ read_file()

result< std::string > e2sar::read_file ( std::string_view path)