octopussy

package
v0.0.0-...-afc3a2c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2016 License: MIT Imports: 11 Imported by: 0

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) Close

func (s *Server) Close() error

Close closes the underlying AMQP connection.

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

func (s *Server) SetupConnection() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL