pubsub

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 17 Imported by: 0

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