message_protocol

Download Schema

HeartbeatPayload

Payload for heartbeat messages indicating system health status.

Heartbeat messages are used to monitor the health and availability of system components. They include a status indicator and optional context information.

Attributes:

context: Optional additional data about the system state status: Current health status of the component

Examples:

```python heartbeat = HeartbeatPayload(

status=HeartbeatStatus.OK, context={“cpu_usage”: 0.25, “memory_usage”: 0.60}

) print(heartbeat.status) # HeartbeatStatus.OK

warning_heartbeat = HeartbeatPayload(

status=HeartbeatStatus.WARNING, context={“disk_space_low”: True}

type

object

properties

  • payload_type

Payload Type

type

string

default

HeartbeatPayload

const

HeartbeatPayload

  • context

Context

Additional context for the heartbeat message.

default

null

oneOf

type

null

  • status

The status of the heartbeat message

HeartbeatStatus

HeartbeatStatus

Enumeration of possible heartbeat status values.

Represents the health status of a system component, with higher values indicating more severe issues.

Examples:

`python HeartbeatStatus.OK                            # <HeartbeatStatus.OK: 0> HeartbeatStatus.CRITICAL > HeartbeatStatus.WARNING  # True int(HeartbeatStatus.ERROR)                    # 2 `

type

integer

enum

0, 1, 2, 3

LogLevel

Enumeration of log levels for the logging system.

Follows standard Python logging levels with integer values that allow for easy comparison and filtering.

Examples:

`python LogLevel.ERROR > LogLevel.WARNING  # True LogLevel.DEBUG.value               # 10 str(LogLevel.INFO)                 # 'LogLevel.INFO' `

type

integer

enum

50, 40, 30, 20, 10, 0

LogPayload

Payload for log messages containing logging information.

This payload carries log data including the message content, severity level, optional context, and application version.

Attributes:

message: The actual log message text level: Severity level of the log entry context: Optional additional data related to the log application_version: Version of the application generating the log

Examples:

```python log_payload = LogPayload(

message=”System startup complete”, level=LogLevel.INFO, context={“operator”: “John Doe”}, application_version=”1.0.0”

) print(log_payload.level) # LogLevel.INFO ```

type

object

properties

  • payload_type

Payload Type

type

string

default

LogPayload

const

LogPayload

  • message

Message

The message of the log

type

string

  • level

The level of the log message

default

10

LogLevel

  • context

Context

Additional context for the log message

default

null

oneOf

type

null

  • application_version

Application Version

The version of the application

default

null

oneOf

type

string

type

null

Message

MessageType

Enumeration of possible message types in the protocol.

Examples:

`python MessageType.REQUEST  # 'request' MessageType.REPLY    # 'reply' MessageType.EVENT    # 'event' `

type

string

enum

request, reply, event

RegisteredMessages

type

object

properties

  • message_type

MessageType

  • protocol_version

Protocol Version

type

string

default

0

const

0

  • timestamp

Timestamp

The timestamp of the message

oneOf

type

string

format

date-time

type

null

  • payload

The payload of the message

RegisteredPayload

  • process_id

Process Id

Process that created the message

oneOf

type

string

type

null

  • hostname

Hostname

Hostname that created the message

oneOf

type

string

type

null

  • rig_name

Rig Name

Rig name that created the message

oneOf

type

string

type

null

RegisteredPayload

_Message[Any]

type

object

properties

  • message_type

MessageType

  • protocol_version

Protocol Version

type

string

default

0

const

0

  • timestamp

Timestamp

The timestamp of the message

oneOf

type

string

format

date-time

type

null

  • payload

Payload

The payload of the message

  • process_id

Process Id

Process that created the message

oneOf

type

string

type

null

  • hostname

Hostname

Hostname that created the message

oneOf

type

string

type

null

  • rig_name

Rig Name

Rig name that created the message

oneOf

type

string

type

null