Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
Channel is a function which takes a message, a channel for sending results, and a channel for signaling that the handler has completed.
type Persister ¶
type Persister interface { Prepare() error SaveResult(string, *result) error SaveMessage(string, *message) error GetResult(string) (*result, error) GetMessages(string, int64) ([]*message, error) }
func NewPersister ¶
func NewPersister() Persister
type Vessel ¶
type Vessel interface { // AddChannel registers the Channel handler with the specified name. AddChannel(string, Channel) // Start will start the server on the given ports. Start(string, string) error // Recv will handle a message by invoking any registered Channel handler. // It returns channels for receiving responses and checking if the message // handler has completed. Recv(*message) (<-chan string, <-chan bool, error) // Broadcast sends the specified message on the given channel to all connected clients. Broadcast(string, string) // Persister returns the Persister for this Vessel. Persister() Persister // URI returns the registered URI for this Vessel. URI() string }
Vessel coordinates communication between clients and server. It's responsible for managing Channels and processing incoming and outgoing messages.
func NewSockJSVessel ¶
NewSockJSVessel returns a new Vessel which relies on SockJS as the underlying transport.
Click to show internal directories.
Click to hide internal directories.