config

package
v0.0.0-...-5d62787 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coprocessor

type Coprocessor struct {
	RegionSplitSize typeutil.ByteSize `toml:"region-split-size" json:"region-split-size"`
	RegionSplitKey  uint64            `toml:"region-split-keys" json:"region-split-keys"`
}

Coprocessor the configuration for coprocessor.

type PDConfig

type PDConfig struct {
	PlacementRules []*pdHttp.Rule
	LocationLabels typeutil.StringSlice
}

PDConfig saves some config which may be changed in PD.

type RaftStore

type RaftStore struct {
	Capacity                typeutil.ByteSize `toml:"capacity" json:"capacity"`
	ExtraUsedSpace          typeutil.ByteSize `toml:"extra-used-space" json:"extra-used-space"`
	RegionHeartBeatInterval typeutil.Duration `toml:"pd-heartbeat-tick-interval" json:"pd-heartbeat-tick-interval"`
	StoreHeartBeatInterval  typeutil.Duration `toml:"pd-store-heartbeat-tick-interval" json:"pd-store-heartbeat-tick-interval"`
}

RaftStore the configuration for raft store.

type SimConfig

type SimConfig struct {
	// Simulator
	CaseName                    string            `toml:"case-name"`
	TotalStore                  int               `toml:"total-store"`
	TotalRegion                 int               `toml:"total-region"`
	EnableTransferRegionCounter bool              `toml:"enable-transfer-region-counter"`
	SimTickInterval             typeutil.Duration `toml:"sim-tick-interval"`
	HibernatePercent            int               `toml:"hibernate-percent"`
	// store
	StoreIOMBPerSecond int64       `toml:"store-io-per-second"`
	StoreVersion       string      `toml:"store-version"`
	RaftStore          RaftStore   `toml:"raftstore"`
	Coprocessor        Coprocessor `toml:"coprocessor"`
	// server
	ServerConfig *config.Config `toml:"server"`
}

SimConfig is the simulator configuration.

func NewSimConfig

func NewSimConfig(serverLogLevel string) *SimConfig

NewSimConfig create a new configuration of the simulator.

func (*SimConfig) Adjust

func (sc *SimConfig) Adjust(meta *toml.MetaData) error

Adjust is used to adjust configurations

func (*SimConfig) Speed

func (sc *SimConfig) Speed() uint64

Speed returns the tick speed of the simulator.

Jump to

Keyboard shortcuts

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