host

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2020 License: Apache-2.0, BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnableImmutableChecks = true

Functions

Types

type HostArray

type HostArray struct {
	// contains filtered or unexported fields
}

func NewHostArray

func NewHostArray(h *HostImpl, typeId int32) *HostArray

func (*HostArray) GetBytes

func (h *HostArray) GetBytes(keyId int32) []byte

func (*HostArray) GetInt

func (h *HostArray) GetInt(keyId int32) int64

func (*HostArray) GetLength

func (h *HostArray) GetLength() int32

func (*HostArray) GetObjectId

func (h *HostArray) GetObjectId(keyId int32, typeId int32) int32

func (*HostArray) GetString

func (h *HostArray) GetString(keyId int32) string

func (*HostArray) SetBytes

func (h *HostArray) SetBytes(keyId int32, value []byte)

func (*HostArray) SetInt

func (h *HostArray) SetInt(keyId int32, value int64)

func (*HostArray) SetString

func (h *HostArray) SetString(keyId int32, value string)

type HostBase

type HostBase struct {
	// contains filtered or unexported fields
}

func (*HostBase) AddObject

func (h *HostBase) AddObject(obj interfaces.HostObject) int32

func (*HostBase) FdWrite

func (h *HostBase) FdWrite(fd int32, iovs int32, size int32, written int32) int32

func (*HostBase) GetBytes

func (h *HostBase) GetBytes(objId int32, keyId int32) []byte

func (*HostBase) GetInt

func (h *HostBase) GetInt(objId int32, keyId int32) int64

func (*HostBase) GetKey

func (h *HostBase) GetKey(keyId int32) string

func (*HostBase) GetKeyId

func (h *HostBase) GetKeyId(key string) int32

func (*HostBase) GetObject

func (h *HostBase) GetObject(objId int32) interfaces.HostObject

func (*HostBase) GetObjectId

func (h *HostBase) GetObjectId(objId int32, keyId int32, typeId int32) int32

func (*HostBase) GetString

func (h *HostBase) GetString(objId int32, keyId int32) string

func (*HostBase) HasError

func (h *HostBase) HasError() bool

func (*HostBase) Init

func (h *HostBase) Init(logger LogInterface, root interfaces.HostObject, keyMap *map[string]int32)

func (*HostBase) LoadWasm

func (h *HostBase) LoadWasm(wasmFile string) error

func (*HostBase) Log

func (h *HostBase) Log(logLevel int, text string)

func (*HostBase) Logf

func (h *HostBase) Logf(format string, a ...interface{})

func (*HostBase) RunWasmFunction

func (h *HostBase) RunWasmFunction(functionName string) error

func (*HostBase) SetBytes

func (h *HostBase) SetBytes(objId int32, keyId int32, value []byte)

func (*HostBase) SetError

func (h *HostBase) SetError(text string)

func (*HostBase) SetInt

func (h *HostBase) SetInt(objId int32, keyId int32, value int64)

func (*HostBase) SetString

func (h *HostBase) SetString(objId int32, keyId int32, value string)

type HostImpl

type HostImpl struct {
	HostBase
}

func NewHostImpl

func NewHostImpl() *HostImpl

func (*HostImpl) AddBalance

func (h *HostImpl) AddBalance(obj interfaces.HostObject, color string, amount int64)

func (*HostImpl) Object

func (h *HostImpl) Object(obj interfaces.HostObject, key string, typeId int32) interfaces.HostObject

type HostMap

type HostMap struct {
	// contains filtered or unexported fields
}

func NewHostMap

func NewHostMap(h *HostImpl) *HostMap

func (*HostMap) GetBytes

func (h *HostMap) GetBytes(keyId int32) []byte

func (*HostMap) GetInt

func (h *HostMap) GetInt(keyId int32) int64

func (*HostMap) GetLength

func (h *HostMap) GetLength() int32

func (*HostMap) GetObjectId

func (h *HostMap) GetObjectId(keyId int32, typeId int32) int32

func (*HostMap) GetString

func (h *HostMap) GetString(keyId int32) string

func (*HostMap) SetBytes

func (h *HostMap) SetBytes(keyId int32, value []byte)

func (*HostMap) SetInt

func (h *HostMap) SetInt(keyId int32, value int64)

func (*HostMap) SetString

func (h *HostMap) SetString(keyId int32, value string)

type LogInterface

type LogInterface interface {
	Log(logLevel int, text string)
}

type NullObject

type NullObject struct {
	// contains filtered or unexported fields
}

func (*NullObject) GetBytes

func (n *NullObject) GetBytes(keyId int32) []byte

func (*NullObject) GetInt

func (n *NullObject) GetInt(keyId int32) int64

func (*NullObject) GetObjectId

func (n *NullObject) GetObjectId(keyId int32, typeId int32) int32

func (*NullObject) GetString

func (n *NullObject) GetString(keyId int32) string

func (*NullObject) SetBytes

func (n *NullObject) SetBytes(keyId int32, value []byte)

func (*NullObject) SetInt

func (n *NullObject) SetInt(keyId int32, value int64)

func (*NullObject) SetString

func (n *NullObject) SetString(keyId int32, value string)

type Tracker

type Tracker struct {
	// contains filtered or unexported fields
}

func NewTracker

func NewTracker(keyMap *map[string]int32) *Tracker

func (*Tracker) AddObject

func (t *Tracker) AddObject(obj interfaces.HostObject) int32

func (*Tracker) GetKey

func (t *Tracker) GetKey(keyId int32) string

func (*Tracker) GetKeyId

func (t *Tracker) GetKeyId(key string) int32

func (*Tracker) GetObject

func (t *Tracker) GetObject(objId int32) interfaces.HostObject

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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