conf

package
v0.0.0-...-c3f54fb Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(configFile string) error

加载配置文件,更新 GlobalConfig 对象

func TmpDir

func TmpDir() string

Types

type RedisConfig

type RedisConfig struct {
	// 基础配置
	Bind  string `conf:"bind"`
	Port  int    `conf:"port"`
	Dir   string `conf:"dir"`
	RunID string `conf:"runid"`

	// 数据库个数
	Databases int `conf:"databases"`

	// aof 相关
	AppendOnly     bool   `conf:"appendonly"`     // 是否启用aof
	AppendFilename string `conf:"appendfilename"` // aof文件名
	AppendFsync    string `conf:"appendfsync"`    // aof刷盘间隔

	// 服务器密码
	RequirePass string `conf:"requirepass,omitempty"`

	// 集群
	Peers []string `conf:"peers"`
	Self  string   `conf:"self"`
}
var GlobalConfig *RedisConfig

全局配置

Jump to

Keyboard shortcuts

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