channel

package module
v0.0.0-...-6494de2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 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 Broadcast

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

func NewBroadcast

func NewBroadcast() *Broadcast

func (*Broadcast) Publish

func (bc *Broadcast) Publish(b []byte)

func (*Broadcast) RegisterHandleFunc

func (bc *Broadcast) RegisterHandleFunc(id interface{}, handler func([]byte) []byte)

func (*Broadcast) SendToID

func (bc *Broadcast) SendToID(recvID, sendID interface{}, payload []byte)

func (*Broadcast) SendToIDResponse

func (bc *Broadcast) SendToIDResponse(recvID, sendID interface{}, payload []byte) []byte

func (*Broadcast) Subscribe

func (bc *Broadcast) Subscribe(id interface{}, c chan []byte)

func (*Broadcast) SubscribeFunc

func (bc *Broadcast) SubscribeFunc(id interface{}, f func([]byte))

func (*Broadcast) Unsubscribe

func (bc *Broadcast) Unsubscribe(id interface{})

Jump to

Keyboard shortcuts

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