Skip to main content

Constants

Constants are used throughout deepstream. Common ones are defined in the @deepstream/protobuf repository where binary message parsers are also defined.

Enums and interfaces are defined on the deepstream-types repository.

Server Log Level

namevalue
LOG_LEVEL.DEBUG0
LOG_LEVEL.INFO1
LOG_LEVEL.WARN2
LOG_LEVEL.ERROR3
LOG_LEVEL.OFF100

Server State

namevalue
STATES.CONFIG_LOADED'CONFIG_LOADED'
STATES.LOGGER_INIT'LOGGER_INIT'
STATES.SERVICE_INIT'SERVICE_INIT'
STATES.HANDLER_INIT'HANDLER_INIT'
STATES.CONNECTION_ENDPOINT_INIT'CONNECTION_ENDPOINT_INIT'
STATES.PLUGIN_INIT'PLUGIN_INIT'
STATES.RUNNING'RUNNING'
STATES.PLUGIN_SHUTDOWN'PLUGIN_SHUTDOWN'
STATES.CONNECTION_ENDPOINT_SHUTDOWN'CONNECTION_ENDPOINT_SHUTDOWN'
STATES.HANDLER_SHUTDOWN'HANDLER_SHUTDOWN'
STATES.SERVICE_SHUTDOWN'SERVICE_SHUTDOWN'
STATES.LOGGER_SHUTDOWN'LOGGER_SHUTDOWN'
STATES.STOPPED'STOPPED'

Server Event

note

Not to be confused with pub/sub events.

namevalue
EVENT.INFO'INFO'
EVENT.ERROR'ERROR'
EVENT.DEPRECATED'DEPRECATED'
EVENT.DEEPSTREAM_STATE_CHANGED'DEEPSTREAM_STATE_CHANGED'
EVENT.INCOMING_CONNECTION'INCOMING_CONNECTION'
EVENT.CLOSED_SOCKET_INTERACTION'CLOSED_SOCKET_INTERACTION'
EVENT.CLIENT_DISCONNECTED'CLIENT_DISCONNECTED'
EVENT.CONNECTION_ERROR'CONNECTION_ERROR'
EVENT.AUTH_ERROR'AUTH_ERROR'
EVENT.AUTH_RETRY_ATTEMPTS_EXCEEDED'AUTH_RETRY_ATTEMPTS_EXCEEDED'
EVENT.REGISTERING_USER'REGISTERING_USER'
EVENT.FATAL_EXCEPTION'FATAL_EXCEPTION'
EVENT.NOT_VALID_UUID'NOT_VALID_UUID'
EVENT.CONFIG_TRANSFORM'CONFIG_TRANSFORM'
EVENT.CONFIG_ERROR'CONFIG_ERROR'
EVENT.PLUGIN_ERROR'PLUGIN_ERROR'
EVENT.PLUGIN_INITIALIZATION_ERROR'PLUGIN_INITIALIZATION_ERROR'
EVENT.PLUGIN_INITIALIZATION_TIMEOUT'PLUGIN_INITIALIZATION_TIMEOUT'
EVENT.HTTP_REQUEST_TIMEOUT'HTTP_REQUEST_TIMEOUT'
EVENT.LOCK_RELEASE_TIMEOUT'LOCK_RELEASE_TIMEOUT'
EVENT.LOCK_REQUEST_TIMEOUT'LOCK_REQUEST_TIMEOUT'
EVENT.LEADING_LISTEN'LEADING_LISTEN'
EVENT.LOCAL_LISTEN'LOCAL_LISTEN'
EVENT.INVALID_CONFIG_DATA'INVALID_CONFIG_DATA'
EVENT.INVALID_STATE_TRANSITION'INVALID_STATE_TRANSITION'
EVENT.INVALID_LEADER_REQUEST'INVALID_LEADER_REQUEST'
EVENT.CLUSTER_LEAVE'CLUSTER_LEAVE'
EVENT.CLUSTER_JOIN'CLUSTER_JOIN'
EVENT.CLUSTER_SIZE'CLUSTER_SIZE'
EVENT.UNSUPPORTED_ACTION'UNSUPPORTED_ACTION'
EVENT.UNKNOWN_ACTION'UNKNOWN_ACTION'
EVENT.CLOSED_SOCKET'CLOSED_SOCKET'
EVENT.TELEMETRY_DEBUG'TELEMETRY_DEBUG'
EVENT.TELEMETRY_UNREACHABLE'TELEMETRY_UNREACHABLE'

Client Connection State

namevalue
CONNECTION_STATE.CLOSING'CLOSING'
CONNECTION_STATE.CLOSED'CLOSED'
CONNECTION_STATE.INITIALISING'INITIALISING'
CONNECTION_STATE.AWAITING_CONNECTION'AWAITING_CONNECTION'
CONNECTION_STATE.CHALLENGING'CHALLENGING'
CONNECTION_STATE.AWAITING_AUTHENTICATION'AWAITING_AUTHENTICATION'
CONNECTION_STATE.AUTHENTICATING'AUTHENTICATING'
CONNECTION_STATE.OPEN'OPEN'
CONNECTION_STATE.ERROR'ERROR'
CONNECTION_STATE.RECONNECTING'RECONNECTING'
CONNECTION_STATE.REDIRECTING'REDIRECTING'
CONNECTION_STATE.CHALLENGE_DENIED'CHALLENGE_DENIED'
CONNECTION_STATE.TOO_MANY_AUTH_ATTEMPTS'TOO_MANY_AUTH_ATTEMPTS'
CONNECTION_STATE.AUTHENTICATION_TIMEOUT'AUTHENTICATION_TIMEOUT'
CONNECTION_STATE.PAUSING'PAUSING'
CONNECTION_STATE.OFFLINE'OFFLINE'

Client Event

note

Not to be confused with pub/sub events.

namevalue
EVENT.RECORD_READ_ONLY_MODE'RECORD_READ_ONLY_MODE'
EVENT.UNSOLICITED_MESSAGE'UNSOLICITED_MESSAGE'
EVENT.IS_CLOSED'IS_CLOSED'
EVENT.MAX_RECONNECTION_ATTEMPTS_REACHED'MAX_RECONNECTION_ATTEMPTS_REACHED'
EVENT.CONNECTION_ERROR'CONNECTION_ERROR'
EVENT.ACK_TIMEOUT'ACK_TIMEOUT'
EVENT.UNKNOWN_CORRELATION_ID'UNKNOWN_CORRELATION_ID'
EVENT.HEARTBEAT_TIMEOUT'HEARTBEAT_TIMEOUT'
EVENT.LISTENER_EXISTS'LISTENER_EXISTS'
EVENT.NOT_LISTENING'NOT_LISTENING'
EVENT.CLIENT_OFFLINE'client offline'
EVENT.INVALID_AUTHENTICATION_DETAILS'INVALID_AUTHENTICATION_DETAILS'
EVENT.CONNECTION_LOST'connectionLost'
EVENT.CONNECTION_REESTABLISHED'connectionReestablished'
EVENT.EXIT_LIMBO'exitLimbo'
EVENT.CONNECTION_STATE_CHANGED'connectionStateChanged'
EVENT.CLIENT_DATA_CHANGED'clientDataChanged'
EVENT.REAUTHENTICATION_FAILURE'reauthenticationFailure'
EVENT.AUTHENTICATION_TIMEOUT'AUTHENTICATION_TIMEOUT'
EVENT.RECORD_ALREADY_DESTROYED'RECORD_ALREADY_DESTROYED'
EVENT.RECORD_DELETE_TIMEOUT'RECORD_DELETE_TIMEOUT'
EVENT.RECORD_ERROR'error'
EVENT.RECORD_READY'ready'
EVENT.RECORD_DELETED'delete'
EVENT.RECORD_DISCARDED'discard'
EVENT.RECORD_VERSION_EXISTS'versionExists'
EVENT.RECORD_HAS_PROVIDER_CHANGED'hasProviderChanged'
EVENT.RECORD_STATE_CHANGED'onRecordStateChanged'
EVENT.EVENT.ENTRY_ADDED_EVENT'entry-added'
EVENT.ENTRY_REMOVED_EVENT'entry-removed'
EVENT.ENTRY_MOVED_EVENT'entry-moved'