Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RpcArgs ¶
type RpcArgs interface {
msgp.Unmarshaler
}
type RpcResp ¶
type RpcResp interface {
msgp.MarshalSizer
}
type WasmCodec ¶
type WasmCodec interface {
// DecodeRequest must read from the codecs buffer and return the RPC header information
DecodeRequest() (method string, seq uint32, err error)
// DecodeArgs must read from the codecs buffer and unmarshal arguments into args
DecodeArgs(args RpcArgs) error
// EncodeResp must write the encoded response to the codecs buffer.
// If the buffer doesn't have the capacity to hold the response 0 bytes must be written.
// Partial results are not allowed.
EncodeResp(seq uint32, err error, resp RpcResp) (n int)
}
A WasmCodec represents a memory region allocated by the client containing encoded RPC requests/responses. This region should only be modified using this interface to preserve a compatible client encoding.
Source Files
¶
- codecs.go
- msgp.go
Click to show internal directories.
Click to hide internal directories.