config

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 8

Documentation

Index

Constants

View Source
const DefaultCacheSize = 1000
View Source
const DefaultConfigTemplate = `` /* 1323-byte string literal not displayed */

DefaultConfigTemplate defines the configuration template for the memiavl configuration

Variables

This section is empty.

Functions

This section is empty.

Types

type MemIAVLConfig

type MemIAVLConfig struct {
	// Enable defines if the memiavl should be enabled.
	Enable bool `mapstructure:"enable"`
	// ZeroCopy defines if the memiavl should return slices pointing to mmap-ed buffers directly (zero-copy),
	// the zero-copied slices must not be retained beyond current block's execution.
	// the sdk address cache will be disabled if zero-copy is enabled.
	ZeroCopy bool `mapstructure:"zero-copy"`
	// AsyncCommitBuffer defines the size of asynchronous commit queue, this greatly improve block catching-up
	// performance, -1 means synchronous commit.
	AsyncCommitBuffer int `mapstructure:"async-commit-buffer"`
	// SnapshotKeepRecent defines what many old snapshots (excluding the latest one) to keep after new snapshots are
	// taken, defaults to 1 to make sure ibc relayers work.
	SnapshotKeepRecent uint32 `mapstructure:"snapshot-keep-recent"`
	// SnapshotInterval defines the block interval the memiavl snapshot is taken, default to 1000.
	SnapshotInterval uint32 `mapstructure:"snapshot-interval"`
	// CacheSize defines the size of the cache for each memiavl store.
	CacheSize int `mapstructure:"cache-size"`
}

func DefaultMemIAVLConfig

func DefaultMemIAVLConfig() MemIAVLConfig

Jump to

Keyboard shortcuts

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