msgprpc

package
v0.0.0-...-6c78b00 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package msgprpc provides a static en-/decoder for requests and responses of the [MessagePack-RPC Specification](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md). This static en-/decoder requires no reflection and is compatible with the [tinygo compiler](https://tinygo.org) for usage in WASM clients.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MsgpNullableString

type MsgpNullableString string

func (MsgpNullableString) MarshalMsg

func (z MsgpNullableString) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (MsgpNullableString) Msgsize

func (z MsgpNullableString) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MsgpNullableString) UnmarshalMsg

func (z *MsgpNullableString) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Request

type Request struct {
	Seq    uint32
	Method string
	Args   Value
	// contains filtered or unexported fields
}

func (*Request) MarshalMsg

func (z *Request) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Request) Msgsize

func (z *Request) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Request) UnmarshalMsg

func (z *Request) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Response

type Response struct {
	Seq    uint32
	Error  MsgpNullableString
	Result msgp.Raw
	// contains filtered or unexported fields
}

func (*Response) MarshalMsg

func (z *Response) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Response) Msgsize

func (z *Response) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Response) UnmarshalMsg

func (z *Response) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Value

type Value interface {
	msgp.Sizer
	msgp.Marshaler
	msgp.Unmarshaler
}

Source Files

  • msgp_encoding.go
  • msgp_encoding_gen.go

Jump to

Keyboard shortcuts

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