pubsub

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DATATYPE_BUFFER = 3
View Source
const DATATYPE_JSON = 2
View Source
const DATATYPE_NULL = 1
View Source
const DATATYPE_UNDEFINED = 0

Variables

This section is empty.

Functions

func Create

func Create(broker *nucleo.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 nucleo.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 nucleo.BrokerContext) chan nucleo.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