Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + var ErrEndOfIOSequence = errors.New("write beyond end of IOSequence") + func CopyInVec(ctx context.Context, uio IO, ars hostarch.AddrRangeSeq, dst []byte, ...) (int, error) + func CopyInt32StringInVec(ctx context.Context, uio IO, ars hostarch.AddrRangeSeq, dst *int32, ...) (int64, error) + func CopyInt32StringsInVec(ctx context.Context, uio IO, ars hostarch.AddrRangeSeq, dsts []int32, ...) (int64, error) + func CopyOutVec(ctx context.Context, uio IO, ars hostarch.AddrRangeSeq, src []byte, ...) (int, error) + func CopyStringIn(ctx context.Context, uio IO, addr hostarch.Addr, maxlen int, opts IOOpts) (string, error) + func ZeroOutVec(ctx context.Context, uio IO, ars hostarch.AddrRangeSeq, toZero int64, ...) (int64, error) + type BytesIO struct + Bytes []byte + func (b *BytesIO) CompareAndSwapUint32(ctx context.Context, addr hostarch.Addr, old, new uint32, opts IOOpts) (uint32, error) + func (b *BytesIO) CopyIn(ctx context.Context, addr hostarch.Addr, dst []byte, opts IOOpts) (int, error) + func (b *BytesIO) CopyInTo(ctx context.Context, ars hostarch.AddrRangeSeq, dst safemem.Writer, ...) (int64, error) + func (b *BytesIO) CopyOut(ctx context.Context, addr hostarch.Addr, src []byte, opts IOOpts) (int, error) + func (b *BytesIO) CopyOutFrom(ctx context.Context, ars hostarch.AddrRangeSeq, src safemem.Reader, ...) (int64, error) + func (b *BytesIO) LoadUint32(ctx context.Context, addr hostarch.Addr, opts IOOpts) (uint32, error) + func (b *BytesIO) SwapUint32(ctx context.Context, addr hostarch.Addr, new uint32, opts IOOpts) (uint32, error) + func (b *BytesIO) ZeroOut(ctx context.Context, addr hostarch.Addr, toZero int64, opts IOOpts) (int64, error) + type IO interface + CompareAndSwapUint32 func(ctx context.Context, addr hostarch.Addr, old, new uint32, opts IOOpts) (uint32, error) + CopyIn func(ctx context.Context, addr hostarch.Addr, dst []byte, opts IOOpts) (int, error) + CopyInTo func(ctx context.Context, ars hostarch.AddrRangeSeq, dst safemem.Writer, ...) (int64, error) + CopyOut func(ctx context.Context, addr hostarch.Addr, src []byte, opts IOOpts) (int, error) + CopyOutFrom func(ctx context.Context, ars hostarch.AddrRangeSeq, src safemem.Reader, ...) (int64, error) + LoadUint32 func(ctx context.Context, addr hostarch.Addr, opts IOOpts) (uint32, error) + SwapUint32 func(ctx context.Context, addr hostarch.Addr, new uint32, opts IOOpts) (uint32, error) + ZeroOut func(ctx context.Context, addr hostarch.Addr, toZero int64, opts IOOpts) (int64, error) + type IOCopyContext struct + Ctx context.Context + IO IO + Opts IOOpts + func (i *IOCopyContext) CopyInBytes(addr hostarch.Addr, b []byte) (int, error) + func (i *IOCopyContext) CopyOutBytes(addr hostarch.Addr, b []byte) (int, error) + func (i *IOCopyContext) CopyScratchBuffer(size int) []byte + type IOOpts struct + AddressSpaceActive bool + IgnorePermissions bool + type IOReadWriter struct + Addr hostarch.Addr + Ctx context.Context + IO IO + Opts IOOpts + func (rw *IOReadWriter) Read(dst []byte) (int, error) + func (rw *IOReadWriter) Write(src []byte) (int, error) + type IOSequence struct + Addrs hostarch.AddrRangeSeq + IO IO + Opts IOOpts + func BytesIOSequence(buf []byte) IOSequence + func (s IOSequence) CopyIn(ctx context.Context, dst []byte) (int, error) + func (s IOSequence) CopyInTo(ctx context.Context, dst safemem.Writer) (int64, error) + func (s IOSequence) CopyOut(ctx context.Context, src []byte) (int, error) + func (s IOSequence) CopyOutFrom(ctx context.Context, src safemem.Reader) (int64, error) + func (s IOSequence) DropFirst(n int) IOSequence + func (s IOSequence) DropFirst64(n int64) IOSequence + func (s IOSequence) NumBytes() int64 + func (s IOSequence) Reader(ctx context.Context) *IOSequenceReadWriter + func (s IOSequence) TakeFirst(n int) IOSequence + func (s IOSequence) TakeFirst64(n int64) IOSequence + func (s IOSequence) Writer(ctx context.Context) *IOSequenceReadWriter + func (s IOSequence) ZeroOut(ctx context.Context, toZero int64) (int64, error) + type IOSequenceReadWriter struct + func (rw *IOSequenceReadWriter) Init(ctx context.Context, src IOSequence) + func (rw *IOSequenceReadWriter) Len() int + func (rw *IOSequenceReadWriter) Read(dst []byte) (int, error) + func (rw *IOSequenceReadWriter) Write(src []byte) (int, error)