Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultUpgrader = &websocket.Upgrader{}
Functions ¶
This section is empty.
Types ¶
type ConnectionFactory ¶
type ConnectionFactory func() (*amqp.Connection, error)
ConnectionFactory is a function capable of creating an AMQP connection.
func DialURL ¶
func DialURL(url, rootCACert, dnsResolvers string) ConnectionFactory
func DialURLWithBackoff ¶
func DialURLWithBackoff(url, rootCACert, dnsResolvers string) ConnectionFactory
type Server ¶
type Server struct { // Name of the exchange to use. Exchange string // Optional function that runs on error. Can be used for logging. OnError func(error) // Optional function called with every incoming connection. OnConn func(http.Request) // ConnectionFactory is a function capable of creating the underlying // AMQP connection. ConnectionFactory ConnectionFactory // websocket.Upgrader used for setting up the WS connection Upgrader *websocket.Upgrader // contains filtered or unexported fields }
Server is an AMQP-to-websockets bridge.
func (*Server) Handler ¶
func (s *Server) Handler() func(http.ResponseWriter, *http.Request)
Handler returns an HTTP handler that can be directly connected to the router.
func (*Server) SetupConnection ¶
Click to show internal directories.
Click to hide internal directories.