codec

package
v0.0.0-...-846bdf4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	PtpSessionID    = "x-ptp-session-id"
	PtpTargetNodeID = "x-ptp-target-node-id"
	PtpSourceNodeID = "x-ptp-source-node-id"
	PtpTraceID      = "x-ptp-trace-id"
	PtpTopicID      = "x-ptp-topic"
)

header

Variables

This section is empty.

Functions

func BuildInvokeOutboundByErr

func BuildInvokeOutboundByErr(err *transerr.TransError) *pb.Outbound

func BuildInvokeOutboundByPayload

func BuildInvokeOutboundByPayload(payload []byte) *pb.Outbound

func BuildTransportOutboundByErr

func BuildTransportOutboundByErr(err *transerr.TransError) *pb.TransportOutbound

func BuildTransportOutboundByPayload

func BuildTransportOutboundByPayload(payload []byte) *pb.TransportOutbound

Types

type Codec

type Codec interface {
	Marshal(out *Outbound) ([]byte, error)
	UnMarshal([]byte) (*Outbound, error)
	ContentType() string
}

type Outbound

type Outbound ptp.TransportOutbound

func BuildOutboundByErr

func BuildOutboundByErr(err *transerr.TransError) *Outbound

func BuildOutboundByPayload

func BuildOutboundByPayload(payload []byte) *Outbound

type ProtoCodec

type ProtoCodec struct {
}

func NewProtoCodec

func NewProtoCodec() *ProtoCodec

func (*ProtoCodec) ContentType

func (c *ProtoCodec) ContentType() string

func (*ProtoCodec) Marshal

func (c *ProtoCodec) Marshal(out *Outbound) ([]byte, error)

func (*ProtoCodec) UnMarshal

func (c *ProtoCodec) UnMarshal(b []byte) (*Outbound, error)

Jump to

Keyboard shortcuts

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