feudal/context/handler.go

16 lines
288 B
Go
Raw Permalink Normal View History

2024-05-05 07:11:52 +00:00
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package context
import (
"feudal/message"
)
// Register a handler for a message event type
type MessageHandler func(m message.Envelope)
func (h MessageHandler) Handle(m message.Envelope) {
h(m)
}