memory
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- func ExtismFree(offset ExtismPointer)
- func ExtismLength(offset ExtismPointer) uint64
- func ExtismLengthUnsafe(ExtismPointer) uint64
- func ExtismLoadU64(offset ExtismPointer) uint64
- func ExtismLoadU8(offset ExtismPointer) uint8
- func ExtismStoreU64(offset ExtismPointer, v uint64)
- func ExtismStoreU8(offset ExtismPointer, v uint8)
- func Load(offset ExtismPointer, buf []byte)
- func Store(offset ExtismPointer, buf []byte)
- type ExtismPointer
- type Memory
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcExtismFree¶
func ExtismFree(offsetExtismPointer)
extismFree releases the bytes previously allocated with `extism_alloc` at the given `offset`.
funcExtismLength¶
func ExtismLength(offsetExtismPointer)uint64
extismLength returns the number of bytes associated with the block of host memorylocated at `offset`.
funcExtismLengthUnsafe¶
func ExtismLengthUnsafe(ExtismPointer)uint64
funcExtismLoadU64¶
func ExtismLoadU64(offsetExtismPointer)uint64
extismLoadU64 returns the 64-bit unsigned integer at location `offset` in the host memory block.Note that `offset` must lie on an 8-byte boundary.
funcExtismLoadU8¶
func ExtismLoadU8(offsetExtismPointer)uint8
funcExtismStoreU64¶
func ExtismStoreU64(offsetExtismPointer, vuint64)
extismStoreU64 stores the 64-bit unsigned integer value `v` at location `offset` in the host memory block.Note that `offset` must lie on an 8-byte boundary.
funcExtismStoreU8¶
func ExtismStoreU8(offsetExtismPointer, vuint8)
funcLoad¶
func Load(offsetExtismPointer, buf []byte)
funcStore¶
func Store(offsetExtismPointer, buf []byte)
Types¶
typeExtismPointer¶
type ExtismPointeruint64
funcExtismAlloc¶
func ExtismAlloc(lengthuint64)ExtismPointer
extismAlloc allocates `length` bytes of data with host memory for use by the pluginand returns its offset within the host memory block.
typeMemory¶
type Memory struct {// contains filtered or unexported fields}Memory represents memory allocated by (and shared with) the host.
funcAllocateBytes¶
AllocateBytes allocates and saves the `data` into Memory on the host.
funcNewMemory¶
func NewMemory(offsetExtismPointer, lengthuint64)Memory