func BenchmarkThisDecoder(b *testing.B) { rr := &repeatReader{e} r := xdr.NewReader(rr) var t XDRBenchStruct for i := 0; i < b.N; i++ { err := t.decodeXDR(r) if err != nil { b.Fatal(err) } rr.Reset(e) } }
func TestHeaderMarshalUnmarshal(t *testing.T) { f := func(ver, id, typ int) bool { ver = int(uint(ver) % 16) id = int(uint(id) % 4096) typ = int(uint(typ) % 256) buf := new(bytes.Buffer) xw := xdr.NewWriter(buf) h0 := header{version: ver, msgID: id, msgType: typ} h0.encodeXDR(xw) xr := xdr.NewReader(buf) var h1 header h1.decodeXDR(xr) return h0 == h1 } if err := quick.Check(f, nil); err != nil { t.Error(err) } }
func (o *SessionInvitation) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *XDRBenchStruct) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.decodeXDR(xr) }
func (o *EmptyMessage) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *Option) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *ClusterConfigMessage) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *FileInfoTruncated) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.decodeXDR(xr) }
func (o *header) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.DecodeXDRFrom(xr) }
func (o *Address) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *ClusterConfigMessage) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.DecodeXDRFrom(xr) }
func (o *ResponseMessage) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *fileVersion) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *versionList) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *repeatReader) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *SessionInvitation) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.DecodeXDRFrom(xr) }
func (o *header) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *XDRBenchStruct) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *FileInfoTruncated) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *Repository) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *BlockInfo) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *JoinSessionRequest) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *Device) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }
func (o *JoinSessionRequest) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.DecodeXDRFrom(xr) }
func (o *Option) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.decodeXDR(xr) }
func (o *ConnectRequest) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.DecodeXDRFrom(xr) }
func (o *EmptyMessage) UnmarshalXDR(bs []byte) error { var br = bytes.NewReader(bs) var xr = xdr.NewReader(br) return o.decodeXDR(xr) }
func (o *TestStruct) DecodeXDR(r io.Reader) error { xr := xdr.NewReader(r) return o.decodeXDR(xr) }