jspubsub

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Rendered for js/wasm

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgedSubscription

type BridgedSubscription struct {
	pubsubinterfaces.Subscription
	// contains filtered or unexported fields
}

func (*BridgedSubscription) Cancel

func (bs *BridgedSubscription) Cancel()

func (*BridgedSubscription) Next

func (*BridgedSubscription) QueueJS

func (bs *BridgedSubscription) QueueJS(msg js.Value)

type PubSubBridge

type PubSubBridge struct {
	pubsubinterfaces.Pubsubber
	// contains filtered or unexported fields
}

PubSubBridge is a bridge where golang (in wasm) can use the underlying javascript pubsub for (for example) the tupelo client

func NewPubSubBridge

func NewPubSubBridge(jspubsub js.Value) *PubSubBridge

func (*PubSubBridge) Publish

func (psb *PubSubBridge) Publish(topic string, data []byte) error

func (*PubSubBridge) Subscribe

func (psb *PubSubBridge) Subscribe(topic string) (pubsubinterfaces.Subscription, error)

Jump to

Keyboard shortcuts

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