forked from p93542168/wheat-cache
feat(gateway-codce): update codce option
This commit is contained in:
parent
cbf7ba1933
commit
62eaa8edd0
|
@ -20,7 +20,7 @@ func (protoCodec) Unmarshal(data []byte, v interface{}) error {
|
|||
return proto.Unmarshal(data, v.(proto.Message))
|
||||
}
|
||||
|
||||
type frame struct {
|
||||
type Frame struct {
|
||||
payload []byte
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ func (p *proxyCodec) Name() string {
|
|||
}
|
||||
|
||||
func (p *proxyCodec) Marshal(v interface{}) ([]byte, error) {
|
||||
out, ok := v.(*frame)
|
||||
out, ok := v.(*Frame)
|
||||
if !ok {
|
||||
return p.Marshal(v)
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ func (p *proxyCodec) Marshal(v interface{}) ([]byte, error) {
|
|||
}
|
||||
|
||||
func (p *proxyCodec) Unmarshal(data []byte, v interface{}) error {
|
||||
dst, ok := v.(*frame)
|
||||
dst, ok := v.(*Frame)
|
||||
if !ok {
|
||||
return p.Unmarshal(data, v)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue