pubsub

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(broker *moleculer.BrokerDelegates) transit.Transit

Types

type ActionError

type ActionError interface {
	Error() string
	Stack() string
}

type PubSub

type PubSub struct {
	// contains filtered or unexported fields
}

PubSub is a transit implementation.

func (*PubSub) Connect

func (pubsub *PubSub) Connect() chan error

Connect : connect the transit with the transporter, subscribe to all events and start publishing its node info

func (*PubSub) Disconnect

func (pubsub *PubSub) Disconnect() chan error

Disconnect : disconnect the transit's transporter.

func (*PubSub) DiscoverNode

func (pubsub *PubSub) DiscoverNode(nodeID string)

func (*PubSub) DiscoverNodes

func (pubsub *PubSub) DiscoverNodes() chan bool

DiscoverNodes will check if there are neighbours and return true if any are found ;).

func (*PubSub) Emit

func (pubsub *PubSub) Emit(context moleculer.BrokerContext)

Emit emit an event to all services that listens to this event.

func (*PubSub) Ready

func (pubsub *PubSub) Ready()

func (*PubSub) Request

func (pubsub *PubSub) Request(context moleculer.BrokerContext) chan moleculer.Payload

func (*PubSub) SendHeartbeat

func (pubsub *PubSub) SendHeartbeat()

func (*PubSub) SendPing

func (pubsub *PubSub) SendPing()

Jump to

Keyboard shortcuts

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