top

Package message 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:

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

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 6 package(s)

  1. github.com/PuerkitoBio/juggler
  2. github.com/PuerkitoBio/juggler/broker
  3. github.com/PuerkitoBio/juggler/broker/redisbroker
  4. github.com/PuerkitoBio/juggler/callee
  5. github.com/PuerkitoBio/juggler/client
  6. github.com/PuerkitoBio/juggler/internal/srvhandler

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