Module: NNQ
- Defined in:
- lib/nnq.rb,
lib/nnq/bus.rb,
lib/nnq/pair.rb,
lib/nnq/error.rb,
lib/nnq/engine.rb,
lib/nnq/socket.rb,
lib/nnq/options.rb,
lib/nnq/pub_sub.rb,
lib/nnq/reactor.rb,
lib/nnq/req_rep.rb,
lib/nnq/version.rb,
lib/nnq/push_pull.rb,
lib/nnq/connection.rb,
lib/nnq/routing/bus.rb,
lib/nnq/routing/pub.rb,
lib/nnq/routing/rep.rb,
lib/nnq/routing/req.rb,
lib/nnq/routing/sub.rb,
lib/nnq/routing/pair.rb,
lib/nnq/routing/pull.rb,
lib/nnq/routing/push.rb,
lib/nnq/monitor_event.rb,
lib/nnq/transport/ipc.rb,
lib/nnq/transport/tcp.rb,
lib/nnq/engine/reconnect.rb,
lib/nnq/routing/surveyor.rb,
lib/nnq/transport/inproc.rb,
lib/nnq/routing/backtrace.rb,
lib/nnq/routing/send_pump.rb,
lib/nnq/routing/respondent.rb,
lib/nnq/surveyor_respondent.rb,
lib/nnq/engine/socket_lifecycle.rb,
lib/nnq/engine/connection_lifecycle.rb
Defined Under Namespace
Modules: Reactor, Routing, Transport Classes: BUS0, ClosedError, Connection, ConnectionRejected, Engine, Error, MonitorEvent, Options, PAIR0, PUB0, PULL0, PUSH0, ProtocolError, REP0, REQ0, RESPONDENT0, RequestCancelled, SUB0, SURVEYOR0, Socket, TimedOut, TimeoutError
Constant Summary collapse
- PAIR =
PAIR0- PUB =
PUB0- SUB =
SUB0- REQ =
REQ0- REP =
REP0- VERSION =
"0.5.0"- PUSH =
PUSH0- PULL =
PULL0
Instance Attribute Summary collapse
-
#detail ⇒ Hash?
readonly
Extra context.
-
#endpoint ⇒ String?
readonly
The endpoint involved.
-
#type ⇒ Symbol
readonly
Event type (:listening, :connected, :disconnected, …).
Class Method Summary collapse
-
.freeze_for_ractors! ⇒ Object
Freezes module-level state so NNQ sockets can be used inside Ractors.
Instance Attribute Details
#detail ⇒ Hash? (readonly)
Returns extra context.
13 14 15 16 17 |
# File 'lib/nnq/monitor_event.rb', line 13 MonitorEvent = Data.define(:type, :endpoint, :detail) do def initialize(type:, endpoint: nil, detail: nil) super end end |
#endpoint ⇒ String? (readonly)
Returns the endpoint involved.
13 14 15 16 17 |
# File 'lib/nnq/monitor_event.rb', line 13 MonitorEvent = Data.define(:type, :endpoint, :detail) do def initialize(type:, endpoint: nil, detail: nil) super end end |
#type ⇒ Symbol (readonly)
Returns event type (:listening, :connected, :disconnected, …).
13 14 15 16 17 |
# File 'lib/nnq/monitor_event.rb', line 13 MonitorEvent = Data.define(:type, :endpoint, :detail) do def initialize(type:, endpoint: nil, detail: nil) super end end |
Class Method Details
.freeze_for_ractors! ⇒ Object
Freezes module-level state so NNQ sockets can be used inside Ractors. Call this once before spawning any Ractors that create NNQ sockets.
9 10 11 12 13 |
# File 'lib/nnq.rb', line 9 def self.freeze_for_ractors! Engine::CONNECTION_FAILED.freeze Engine::CONNECTION_LOST.freeze Engine::TRANSPORTS.freeze end |