vm

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetPort

func GetPort(name string) int

func ReceiveFromController

func ReceiveFromController(portNum int, msg string) (string, error)

func RegisterPortHandler

func RegisterPortHandler(name string, portHandler PortHandler) int

func SetControllerContext

func SetControllerContext(ctx sdk.Context) func()

func UnregisterPortHandler

func UnregisterPortHandler(portNum int) error

Types

type ActionPusher

type ActionPusher func(ctx sdk.Context, action Jsonable) error

ActionPusher enqueues data for later consumption by the controller.

type ControllerAdmissionMsg

type ControllerAdmissionMsg interface {
	sdk.Msg
	CheckAdmissibility(sdk.Context, interface{}) error

	// GetInboundMsgCount returns the number of Swingset messages which will
	// be added to the inboundQueue.
	GetInboundMsgCount() int32

	// IsHighPriority returns whether the message should be considered for
	// high priority processing, including bypass of some inbound checks
	// and queueing on higher priority queues.
	IsHighPriority(sdk.Context, interface{}) (bool, error)
}

type ControllerContext

type ControllerContext struct {
	Context               sdk.Context
	StoragePort           int
	IBCChannelHandlerPort int
}

type Jsonable

type Jsonable interface{}

Jsonable is a value, j, that can be passed through json.Marshal(j).

type PortHandler

type PortHandler interface {
	Receive(*ControllerContext, string) (string, error)
}

Jump to

Keyboard shortcuts

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