bus

package
v0.0.0-...-df772b4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

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

Bus struct

func New

func New() *Bus

New Bus struct

func (*Bus) Publish

func (b *Bus) Publish(msg *protocol.Message) error

Publish msg to bus

func (*Bus) Register

func (b *Bus) Register(id string, ch chan *protocol.Message) error

Register receiver

func (*Bus) Retrieve

func (b *Bus) Retrieve() <-chan *protocol.Message

Retrieve msg from bus

func (*Bus) Start

func (b *Bus) Start()

func (*Bus) Stop

func (b *Bus) Stop()

func (*Bus) Unregister

func (b *Bus) Unregister(id string)

Unregister receiver

type Reader

type Reader interface {
	Retrieve() <-chan *protocol.Message
}

Reader interface

type Writer

type Writer interface {
	Publish(msg *protocol.Message) error
}

Writer interface

Jump to

Keyboard shortcuts

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