mxcubecore.ipc.constants

Constants for the mxcubecore IPC layer: wire format version and error codes.

The wire-format ones (IPC_FORMAT_VERSION, the reserved method names and ErrorCode) are mirrored in the separate mxcube-ipc-client package (mxcube_ipc_client/constants.py) - keep the two in step.

Module Attributes

IPC_FORMAT_VERSION

Version of the IPC wire format defined by mxcubecore/ipc/IPC_FORMAT.md

AUTH_METHOD

Method name reserved for the authentication handshake.

DESCRIBE_METHOD

Method name reserved for whitelist self-description (see mxcubecore.ipc.whitelist.describe() and IPC_FORMAT.md section 6).

DEBUG_LIST_ROLES_METHOD

Method names reserved for the debug bypass (see mxcubecore.ipc.debug and IPC_FORMAT.md section 7).

Classes

ErrorCode(value[, names, module, qualname, ...])

Error codes carried in an mxcubecore.ipc.models.IPCError.

mxcubecore.ipc.constants.AUTH_METHOD = '_auth'

Method name reserved for the authentication handshake.

mxcubecore.ipc.constants.DEBUG_LIST_ROLES_METHOD = '_debug_list_roles'

Method names reserved for the debug bypass (see mxcubecore.ipc.debug and IPC_FORMAT.md section 7). Disabled by default - only handled at all if IPCServer’s allow_debug_calls config is true.

mxcubecore.ipc.constants.DESCRIBE_METHOD = '_describe'

Method name reserved for whitelist self-description (see mxcubecore.ipc.whitelist.describe() and IPC_FORMAT.md section 6).

class mxcubecore.ipc.constants.ErrorCode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Error codes carried in an mxcubecore.ipc.models.IPCError.

The negative range below -32000 mirrors the JSON-RPC 2.0 reserved codes so a plain JSON-RPC client can interpret them, as defined by the JSON-RPC 2.0 spec.

mxcubecore.ipc.constants.IPC_FORMAT_VERSION = '0.0.1'

Version of the IPC wire format defined by mxcubecore/ipc/IPC_FORMAT.md