bridge

package
v0.0.0-...-957e36a Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetBridge

func SetBridge(b Bridge)

Types

type Bridge

type Bridge interface {
	Publisher
	SetReceiver(Receiver)
	Start() error
	Stop() error
}

func CreateEtcdBridge

func CreateEtcdBridge(client *clientv3.Client) Bridge

func CreateLocalBridge

func CreateLocalBridge() Bridge

func GetBridge

func GetBridge() Bridge

type Publisher

type Publisher interface {
	AddRoom(roomID int64) error
	DelRoom(roomID int64) error
}

type Receiver

type Receiver interface {
	OnAddRoom(roomID int64)
	OnDelRoom(roomID int64)
}

Jump to

Keyboard shortcuts

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