Skip to main content
Module

x/ddapps/messages.ts>EMType

Deno distributed applications framework
Latest
enum EMType
import { EMType } from "https://deno.land/x/ddapps@1.6.5/messages.ts";

List of Messages available. Use it for a stronger typing.

Members

Any = "Any"

Send arbitrary data to a peer, to avoid

ClientConnectionClose = "ClientConnectionClose"

Client connection has been closed

ClientConnectionOpen = "ClientConnectionOpen"

Indicates a Client has opened a connection to the server

ClientNotification = "ClientNotification"

Message sent to clients as a notification (client won't close connection on reception) It contains the operation that has been performed

ClientRequest = "ClientRequest"

Message sent by clients to formulate requests It contains the operation to perform

ClientResponse = "ClientResponse"

Message sent to clients to respond to requests It contains the operation that has been performed

DiscoveryEndpointCalled = "DiscoveryEndpointCalled"

A peer exposes the /discovery endpoint that returns the peer IP (legacy) This message is sent to Logger to indicate a peer has call the endpoint (the remote peer is thus in the discovery phase)

DiscoveryResult = "DiscoveryResult"

Emitted during the network initialisation to indicate whether a peer to join has been found. The message is always emitted even if --discovery is disabled

InitialMessage = "InitialMessage"

Message sent by DDAPPS to all components just after the server started. Use it an initialisation hook

InvalidClientRequestType = "InvalidClientRequestType"

Currently only used by Client but not emitted by server Indicates that the Client formulated an invalid ClientRequest

InvalidMessageDestination = "InvalidMessageDestination"

When a message destination is an IP or a Hostname, the Net will try to send it on the network This message is emitted if Net didn't find the corresponding Client or RemotePeer

LogMessage = "LogMessage"

Send a LogMessage, usually to the Logger

MonGetRequest = "MonGetRequest"

Fetch a monitoring value (from state, or not, see the Monitor implementation)

MonGetResponse = "MonGetResponse"

Return a value from the state (or other source like Deno.metrics())

MonSetRequest = "MonSetRequest"

Set a state value

MonSetResponse = "MonSetResponse"

Response to a MonSetRequest

MonWatchRequest = "MonWatchRequest"

Get notified when a monitoring value changes. Monitor will send ClientNotification to notify the initiator

PeerConnectionAccepted = "PeerConnectionAccepted"

Indicates to a peer that its incoming connection has been accepted. It provides a list of other peers to connect to

PeerConnectionClose = "PeerConnectionClose"

Peer connection has been closed

PeerConnectionOpen = "PeerConnectionOpen"

A peer just opened a new connection

PeerConnectionRequest = "PeerConnectionRequest"

Connect to a peer

PeerConnectionSuccess = "PeerConnectionSuccess"

The connection to a peer succeeded (the WebSocket it opened)