channel

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetChannelIndex

func GetChannelIndex[Message any](subscribers []FilterableChannel[Message], subscriber <-chan Message) int

Types

type FilterableChannel

type FilterableChannel[Message any] struct {
	Channel chan Message
	Filter  MessageFilter[Message]
}

type MessageFilter

type MessageFilter[Message any] interface {
	Filter(message Message) bool
}

MessageFilter is an interface that defines a method to filter messages.

Jump to

Keyboard shortcuts

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