hub

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 2 Imported by: 0

README

hub

GoDev Build Status Coverage Status Go Report Card

Golang chan broadcasting library.

See original stackoverflow answer.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hub

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

func NewHub

func NewHub() *Hub

func (*Hub) Done

func (h *Hub) Done()

func (*Hub) DoneWithContext

func (h *Hub) DoneWithContext(ctx context.Context)

func (*Hub) Init

func (h *Hub) Init()

func (*Hub) Pub

func (h *Hub) Pub(msg interface{})

func (*Hub) PubWithContext added in v0.0.2

func (h *Hub) PubWithContext(ctx context.Context, msg interface{})

func (*Hub) Start

func (h *Hub) Start(ctx context.Context)

func (*Hub) Stop

func (h *Hub) Stop()

func (*Hub) StopNonBlock

func (h *Hub) StopNonBlock()

func (*Hub) StopWithContext added in v0.0.2

func (h *Hub) StopWithContext(ctx context.Context)

func (*Hub) Sub

func (h *Hub) Sub(capacity int) (sub chan interface{})

func (*Hub) SubWithContext added in v0.0.2

func (h *Hub) SubWithContext(ctx context.Context, capacity int) (sub chan interface{})

func (*Hub) Unsub

func (h *Hub) Unsub(sub chan interface{})

func (*Hub) UnsubNonBlock

func (h *Hub) UnsubNonBlock(sub chan interface{})

func (*Hub) UnsubWithContext added in v0.0.2

func (h *Hub) UnsubWithContext(ctx context.Context, sub chan interface{})

func (*Hub) UnsubWithTimeout

func (h *Hub) UnsubWithTimeout(sub chan interface{}, timeout time.Duration)

Jump to

Keyboard shortcuts

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