package config // RedisConf redis连接配置 type RedisConf struct { // The network type, either tcp or unix. // Default is tcp. Network string `json:",default=tcp,options=tcp|unix,env=REDIS_NETWORK"` // host:port address. Addr string `json:",env=REDIS_ADDR"` // Use the specified Username to authenticate the current connection // with one of the connections defined in the ACL list when connecting // to a Redis 6.0 instance, or greater, that is using the Redis ACL system. Username string `json:",optional,env=REDIS_USERNAME"` // Optional password. Must match the password specified in the // requirepass server configuration option (if connecting to a Redis 5.0 instance, or lower), // or the User Password when connecting to a Redis 6.0 instance, or greater, // that is using the Redis ACL system. Password string `json:",optional,env=REDIS_PASSWORD"` Type string `json:",default=node,options=node|cluster"` // Database to be selected after connecting to the server. DB int `json:",optional,env=REDIS_DB"` Tls bool `json:",optional"` Key string `json:",optional"` }