Skip to main content

Module service

Module service 

Source
Expand description

Service trait for ma endpoint protocol handlers.

A Service is analogous to an entry in /etc/services: a named protocol on a ma endpoint. Register services on an MaEndpoint to handle incoming connections on their protocol.

Constants§

BROADCAST_TOPIC
The well-known broadcast topic / protocol string.
CONTENT_TYPE_CBOR
CONTENT_TYPE_TERM
CBOR term — either a bare atom (:ok, :pong) or a tuple (CBOR array whose first element is a dispatchable atom, e.g. [:ok, data] or [:error, reason]). Used as contentType for RPC and CRUD messages.
CRUD_PROTOCOL_ID
INBOX_PROTOCOL_ID
IPFS_PROTOCOL_ID
MESSAGE_TYPE_BROADCAST
MESSAGE_TYPE_CHAT
MESSAGE_TYPE_CRUD_DELETE
MESSAGE_TYPE_CRUD_DELETE_REPLY
MESSAGE_TYPE_CRUD_EDIT
MESSAGE_TYPE_CRUD_EDIT_REPLY
MESSAGE_TYPE_CRUD_GET
MESSAGE_TYPE_CRUD_GET_REPLY
MESSAGE_TYPE_CRUD_SET
MESSAGE_TYPE_CRUD_SET_REPLY
MESSAGE_TYPE_DOC
MESSAGE_TYPE_EMOTE
MESSAGE_TYPE_IPFS_REQUEST
MESSAGE_TYPE_IPFS_STORE
MESSAGE_TYPE_MESSAGE
MESSAGE_TYPE_RPC
MESSAGE_TYPE_RPC_REPLY
RPC_PROTOCOL_ID

Traits§

Service
Trait that all ma services must implement.