Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // redisClient is the Redis client RedisClient *redis.Client // CacheExpiration is the cache duration CacheExpiration time.Duration // HttpClient is used to set the timeout for rdapQuery HttpClient = &http.Client{ Timeout: 10 * time.Second, } // Wg is used to wait for all goroutines to finish Wg sync.WaitGroup // Port is used to set the port the server listens on Port int // RateLimit is used to set the number of concurrent requests RateLimit int ConcurrencyLimiter chan struct{} // ProxyServer is the proxy server ProxyServer string // ProxySuffixes is the list of TLDs that use a proxy server ProxySuffixes []string )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Redis holds the configuration for the Redis database. // It includes the address, password, and database number. Redis struct { Addr string `json:"addr"` // Addr is the address of the Redis server. Password string `json:"password"` // Password is the password for the Redis server. DB int `json:"db"` // DB is the database number for the Redis server. } `json:"redis"` // CacheExpiration is the expiration time for the cache, in seconds. CacheExpiration int `json:"cacheExpiration"` // Port is the port number for the server. Port int `json:"port"` // RateLimit is the maximum number of requests that a client can make in a specified period of time. RateLimit int `json:"rateLimit"` // ProxyServer is the proxy server to use for certain TLDs. ProxyServer string `json:"proxyServer"` // ProxySuffixes is the list of TLDs that use a proxy server. ProxySuffixes []string `json:"proxySuffixes"` }
Config represents the configuration for the application.
Click to show internal directories.
Click to hide internal directories.