ophandler

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: ISC Imports: 3 Imported by: 1

Documentation

Overview

Package ophandler provides an Op channel reader that redistributes the events into handlers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Loop

func Loop(src <-chan ws.Op, dst *handler.Handler) <-chan struct{}

Loop starts a background goroutine that starts reading from src and distributes received events into the given handler. It's stopped once src is closed. The returned channel will be closed once src is closed.

func WaitForDone

func WaitForDone(ctx context.Context, done <-chan struct{}) error

WaitForDone waits for the done channel returned by Loop until the channel is closed or the context expires.

Types

This section is empty.

Jump to

Keyboard shortcuts

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