mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-04 06:54:45 +08:00
11 lines
257 B
Go
11 lines
257 B
Go
package network
|
|
|
|
type Processor interface {
|
|
// must goroutine safe
|
|
Route(msg interface{}, userData interface{}) error
|
|
// must goroutine safe
|
|
Unmarshal(data []byte) (interface{}, error)
|
|
// must goroutine safe
|
|
Marshal(msg interface{}) ([]byte, error)
|
|
}
|