multi

package
v0.0.0-...-df918ef Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: ISC Imports: 2 Imported by: 1

Documentation

Overview

Package multi provides an event.Handler implementation that calls other event.Handler implementations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler is a MessageHandler implementation that allows multiple implementations to accept the same messages

func (*Handler) AddHandlers

func (m *Handler) AddHandlers(h ...event.MessageHandler)

AddHandlers adds a handler to the MultiHandler instance

func (*Handler) OnMessage

func (m *Handler) OnMessage(msg *event.Message) error

OnMessage implements MessageHandler

func (*Handler) RemoveHandler

func (m *Handler) RemoveHandler(h event.MessageHandler)

RemoveHandler removes a handler from the MultiHandler instance

Jump to

Keyboard shortcuts

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