You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
package message
|
|
|
|
|
|
|
|
|
|
type (
|
|
|
|
|
// Marshaler 序列化
|
|
|
|
|
Marshaler interface {
|
|
|
|
|
Marshal(interface{}) ([]byte, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Unmarshaler 反序列化
|
|
|
|
|
Unmarshaler interface {
|
|
|
|
|
Unmarshal([]byte, interface{}) error
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Serializer 消息 序列化/反序列化,仅针对payload
|
|
|
|
|
Serializer interface {
|
|
|
|
|
Marshaler
|
|
|
|
|
Unmarshaler
|
|
|
|
|
}
|
|
|
|
|
)
|