config

package
v1.1.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RuntimeConfig

type RuntimeConfig struct {
	CacheSaveInterval uint64

	MaxWasmFuel          uint64 // if not 0, enable fuel consumption monitoring to stop runaway wasm module processing forever
	SubrequestsSplitSize uint64 // in multiple of the SaveIntervals above
	MaxJobsAhead         uint64 // limit execution of depencency jobs so they don't go too far ahead of the modules that depend on them (ex: module X is 2 million blocks ahead of module Y that depends on it, we don't want to schedule more module X jobs until Y caught up a little bit)
	ParallelSubrequests  uint64 // how many sub-jobs to launch for a given user
	// derives substores `states/`, for `store` modules snapshots (full and partial)
	// and `outputs/` for execution output of both `map` and `store` module kinds
	BaseObjectStore dstore.Store
	WorkerFactory   work.WorkerFactory

	WithRequestStats       bool
	ModuleExecutionTracing bool
}

RuntimeConfig is a global configuration for the service. It is passed down and should not be modified unless cloned.

func NewRuntimeConfig

func NewRuntimeConfig(
	cacheSaveInterval uint64,
	subrequestsSplitSize uint64,
	parallelSubrequests uint64,
	maxJobsAhead uint64,
	maxWasmFuel uint64,
	baseObjectStore dstore.Store,
	workerFactory work.WorkerFactory,
) RuntimeConfig

Jump to

Keyboard shortcuts

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