runtime

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRuntime

func IsRuntime(runtime Type) bool

IsRuntime checks if the passed in runtime is a supported runtime type

Types

type Runtime

type Runtime interface {
	// Initialize prepares any infrastructure transactions that are required
	// to be executed before the stress test runs, if any
	Initialize(*gnoland.GnoAccount) ([]*std.Tx, error)

	// ConstructTransactions generates and signs the required transactions
	// that will be used in the stress test
	ConstructTransactions(accounts []*gnoland.GnoAccount, transactions uint64) ([]*std.Tx, error)
}

Runtime is the base interface for all runtime implementations.

The runtime's job is to prepare the transactions for the stress test (generate + sign), and to predeploy (initialize) any infrastructure (package)

func GetRuntime

func GetRuntime(runtimeType Type, signer Signer) Runtime

GetRuntime fetches the specified runtime, if any

type Signer

type Signer interface {
	SignTx(tx *std.Tx, account *gnoland.GnoAccount, nonce uint64, passphrase string) error
}

type Type

type Type string
const (
	RealmDeployment   Type = "REALM_DEPLOYMENT"
	PackageDeployment Type = "PACKAGE_DEPLOYMENT"
	RealmCall         Type = "REALM_CALL"
)

func (Type) String

func (r Type) String() string

String returns a string representation of the runtime type

Jump to

Keyboard shortcuts

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