top

Package msg defines the supported types of messages in the juggler protocol.

The juggler.0 protocol defines the following messages for the client:

- CALL : to call an RPC function
- SUB  : to subscribe to a pub/sub channel
- UNSB : to unsubscribe from a pub/sub channel
- PUB  : to publish to a pub/sub channel

And the following messages for the server:

- ERR  : failed CALL, SUB, UNSB or PUB
- OK   : successful CALL (but no result yet), SUB, UNSB or PUB
- RES  : the result of a CALL message
- EVNT : an event triggered on a channel that the client is subscribed to

Closing the communication is done via the standard websocket close process.

All messages must be of type websocket.TextMessage. Failing to properly speak the protocol terminates the connection without notice from the peer. That includes sending binary messages and sending unknown (or invalid for the peer) message types.

Imported by 7 package(s)

  1. github.com/PuerkitoBio/exp/juggler
  2. github.com/PuerkitoBio/exp/juggler/broker
  3. github.com/PuerkitoBio/exp/juggler/broker/redisbroker
  4. github.com/PuerkitoBio/exp/juggler/callee
  5. github.com/PuerkitoBio/exp/juggler/client
  6. github.com/puerkitoBio/exp/juggler
  7. github.com/puerkitobio/exp/juggler

Imports 1 package(s)

  1. github.com/pborman/uuid

Test imports 2 package(s)

  1. github.com/stretchr/testify/assert
  2. github.com/stretchr/testify/require