feat(gateway-codce): update codce option

This commit is contained in:
bandl 2021-10-16 16:53:21 +08:00
parent cbf7ba1933
commit 62eaa8edd0
1 changed files with 3 additions and 3 deletions

View File

@ -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)
}