seqeron 0.18.0
Loading...
Searching...
No Matches
org::limitless::seqeron::util Namespace Reference

Namespaces

namespace  component
 
namespace  eventCode
 
namespace  Logger
 

Classes

struct  Component
 
class  DynamicIdleStrategy
 
struct  EventCode
 
struct  LoggerEvent
 
class  LoggerSink
 
class  StderrLoggerSink
 

Enumerations

enum class  Severity : std::uint8_t { Info , Warn , Error , Fault }
 

Functions

std::int32_t envInt (const char *name, const std::int32_t fallback)
 Reads a base-10 int from the environment.
 
std::string envString (const char *name, const std::string &fallback)
 Reads a string from the environment.
 
bool envFlag (const char *name)
 Whether a variable is set and non-empty — the convention every SEQERON_* opt-in switch uses.
 
std::string joinPath (const std::string &dir, const std::string &name)
 Joins a directory and a name with exactly one separator.
 
std::string resolveAeronDir (const char *envName, const std::int32_t memberId)
 Resolves the co-located cluster member's Aeron directory, which an app shares to reach that node's queue, Replayer and (while it leads) IPC ingress.
 
std::string resolveEgressEndpoint (const char *envName, const std::uint16_t defaultPort)
 Resolves a "host:port" cluster-egress endpoint.
 
bool verboseLoggingEnabled ()
 
DynamicIdleStrategy resolveIdleStrategy ()
 

Enumeration Type Documentation

◆ Severity

enum class org::limitless::seqeron::util::Severity : std::uint8_t
strong
Enumerator
Info 
Warn 
Error 
Fault 

Function Documentation

◆ envFlag()

bool org::limitless::seqeron::util::envFlag ( const char *  name)
inline

Whether a variable is set and non-empty — the convention every SEQERON_* opt-in switch uses.

Parameters
namethe variable to read

◆ envInt()

std::int32_t org::limitless::seqeron::util::envInt ( const char *  name,
const std::int32_t  fallback 
)
inline

Reads a base-10 int from the environment.

Parameters
namethe variable to read
fallbackwhat an unset or empty variable reads as

◆ envString()

std::string org::limitless::seqeron::util::envString ( const char *  name,
const std::string &  fallback 
)
inline

Reads a string from the environment.

Parameters
namethe variable to read
fallbackwhat an unset or empty variable reads as

◆ joinPath()

std::string org::limitless::seqeron::util::joinPath ( const std::string &  dir,
const std::string &  name 
)
inline

Joins a directory and a name with exactly one separator.

macOS's $TMPDIR ends in a slash and Linux's /tmp does not, so concatenating a name onto either gets one of the two platforms wrong.

Parameters
dirthe directory, with or without a trailing slash; empty yields name alone
namethe name to join onto it

◆ resolveAeronDir()

std::string org::limitless::seqeron::util::resolveAeronDir ( const char *  envName,
const std::int32_t  memberId 
)
inline

Resolves the co-located cluster member's Aeron directory, which an app shares to reach that node's queue, Replayer and (while it leads) IPC ingress.

The default is the member's own, under /dev/shm where the host has one, else under TMPDIR; the Java twin is PortLayout.aeronDir.

Parameters
envNamethe per-binary override variable
memberIdthe member whose directory is the default

◆ resolveEgressEndpoint()

std::string org::limitless::seqeron::util::resolveEgressEndpoint ( const char *  envName,
const std::uint16_t  defaultPort 
)
inline

Resolves a "host:port" cluster-egress endpoint.

Every client co-located on one node shares that node's media driver, so each needs a distinct port.

Parameters
envNamethe per-binary override variable
defaultPortthe port this app owns on localhost, from its own application port table

◆ resolveIdleStrategy()

DynamicIdleStrategy org::limitless::seqeron::util::resolveIdleStrategy ( )
inline

◆ verboseLoggingEnabled()

bool org::limitless::seqeron::util::verboseLoggingEnabled ( )
inline