fix: pass context to cert and cache

This commit is contained in:
Jacky 2025-05-05 01:36:39 +00:00
parent 910a2efbd9
commit 0162e10c53
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D
7 changed files with 68 additions and 35 deletions

View file

@ -13,15 +13,10 @@ type NginxLogCache struct {
var (
// logCache is the map to store all found log files
logCache map[string]*NginxLogCache
logCache = make(map[string]*NginxLogCache)
cacheMutex sync.RWMutex
)
func init() {
// Initialize the cache
logCache = make(map[string]*NginxLogCache)
}
// AddLogPath adds a log path to the log cache
func AddLogPath(path, logType, name string) {
cacheMutex.Lock()