conn

package
v0.0.0-...-46a6a0a Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoInit

func AutoInit(c *config)

AutoInit is an option for NewLink. This will indicate that the link should automatically try to call the Init method during the NewLink call. By default you must manually call the Init method on the Link.

func IsNotResponder

func IsNotResponder(c *config)

IsNotResponder is an option for NewLink. It will disable the Responder functionality of the link. By default responder is always enabled.

func IsRequester

func IsRequester(c *config)

IsRequester is an option for NewLink. It specifies that the link should also include requester functionality. By default requester is disabled.

func LogLevel

func LogLevel(l log.Level) func(c *config)

LogLevel is an option for NewLink. It accepts a Level from log. This indicates what level logging should be enabled. By default LogLevel is set to DisabledLevel

func OnConnected

func OnConnected(oc ConnectedCB) func(c *config)

OnConnected is an option for NewLink. It accepts a callback with the signature of ConnectedCB. If supplied this will be called once the Link has successfully connected to an upstream broker.

Types

type ConnectedCB

type ConnectedCB func(*Link)
type Link struct {
	// contains filtered or unexported fields
}
func NewLink(prefix string, options ...func(*config)) *Link

NewLink will create a new Link. The prefix is a require string which identifies this link with the upstream broker. The prefix should end with a hyphen (-) character. You may specify a variable number of configuration methods to help configure the link

func (*Link) GetProvider

func (l *Link) GetProvider() *nodes.Provider

func (*Link) GetRequester

func (l *Link) GetRequester() *nodes.Requester

func (*Link) Init

func (l *Link) Init()

func (*Link) Start

func (l *Link) Start()

func (*Link) Stop

func (l *Link) Stop()

Jump to

Keyboard shortcuts

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