runtime

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 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(
		account std.Account,
		key crypto.PrivKey,
		chainID string,
	) ([]*std.Tx, error)

	// ConstructTransactions generates and signs the required transactions
	// that will be used in the stress test
	ConstructTransactions(
		keys []crypto.PrivKey,
		accounts []std.Account,
		transactions uint64,
		chainID string,
	) ([]*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) Runtime

GetRuntime fetches the specified runtime, if any

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