config

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GamePath                  string  `json:"gamePath"`                  // 游戏可执行文件路径 PalServer.exe 所处的位置
	Address                   string  `json:"address"`                   // 服务器地址 + RCON 端口
	AdminPassword             string  `json:"adminPassword"`             // RCON 管理员密码
	ProcessName               string  `json:"processName"`               // 进程名称 PalServer.exe
	ProcessCheckInterval      int     `json:"processCheckInterval"`      // 进程存活检查间隔(秒)
	MemoryUsageThreshold      float64 `json:"memoryUsageThreshold"`      // 重启阈值(百分比)
	MemoryCleanupInterval     int     `json:"memoryCleanupInterval"`     // 内存清理间隔(秒)
	BackupPath                string  `json:"backupPath"`                // 备份路径
	BackupInterval            int     `json:"backupInterval"`            // 备份间隔(秒)
	MaintenanceWarningMessage string  `json:"maintenanceWarningMessage"` // 维护警告消息(不支持中文且不支持空格)
	UsePerfThreads            bool    `json:"usePerfThreads"`            // 多线程优化
}

func Init

func Init() *Config

func (*Config) PrintLog

func (c *Config) PrintLog()

Jump to

Keyboard shortcuts

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