pubsub

package
v0.0.0-...-457732c Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseTestPubSub

func BaseTestPubSub(t *testing.T, hGen pv.HostGenerator)

go test -test.v=true .

Types

type IPubSub

type IPubSub interface {
	Close()
	AddrInfo() peer.AddrInfo
	Topics() []string
	JoinTopic(string) (IRoom, error)
}

func NewPubSub

func NewPubSub(hGen pv.HostGenerator, bootstraps ...peer.AddrInfo) (IPubSub, error)

type IRoom

type IRoom interface {
	Close()
	ListPeers() []peer.ID
	Publish([]byte) error
	Get() (*recievedMessage, error)
	GetAll() ([]*recievedMessage, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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