rework transport options and extensions
This commit is contained in:
1 parent
eb4a14df7b
commit
8adb569f0f
4 files changed
+35
-37
No files matched your search
@@ -9,6 +9,23 @@ import (
|
||||
|
||||
type Extension func(message *Message)
|
||||
|
||||
type Extensions struct {
|
||||
In []Extension
|
||||
Out []Extension
|
||||
}
|
||||
|
||||
func (e *Extensions) ApplyOutExtensions(m *Message) {
|
||||
for i := range e.Out {
|
||||
e.Out[i](m)
|
||||
}
|
||||
}
|
||||
|
||||
func (e *Extensions) ApplyInExtensions(m *Message) {
|
||||
for i := range e.In {
|
||||
e.In[i](m)
|
||||
}
|
||||
}
|
||||
|
||||
type Data = interface{}
|
||||
|
||||
type Message struct {
|
||||
|
||||
Reference in new issue
Block a user