proto

package
v1.42.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package proto defines the protobuf codec. Importing this package will register the codec.

Index

Constants

View Source
const Name = "proto"

Name is the name registered for the proto compressor.

Variables

This section is empty.

Functions

func NewPBTwoWayCodec added in v1.42.6

func NewPBTwoWayCodec() encoding.TwoWayCodec

NewPBTwoWayCodec new PBTwoWayCodec instance

Types

type PBTwoWayCodec added in v1.42.6

type PBTwoWayCodec struct {
	// contains filtered or unexported fields
}

PBTwoWayCodec is pb impl of TwoWayCodec

func (*PBTwoWayCodec) MarshalRequest added in v1.42.6

func (h *PBTwoWayCodec) MarshalRequest(v interface{}) ([]byte, error)

MarshalRequest marshal interface @v to []byte

func (*PBTwoWayCodec) MarshalResponse added in v1.42.6

func (h *PBTwoWayCodec) MarshalResponse(v interface{}) ([]byte, error)

MarshalResponse marshal interface @v to []byte

func (*PBTwoWayCodec) Name added in v1.42.6

func (h *PBTwoWayCodec) Name() string

func (*PBTwoWayCodec) UnmarshalRequest added in v1.42.6

func (h *PBTwoWayCodec) UnmarshalRequest(data []byte, v interface{}) error

UnmarshalRequest unmarshal bytes @data to interface

func (*PBTwoWayCodec) UnmarshalResponse added in v1.42.6

func (h *PBTwoWayCodec) UnmarshalResponse(data []byte, v interface{}) error

UnmarshalResponse unmarshal bytes @data to interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL