Skip to content

Commit

Permalink
cmd/watcher: move detailer and timezone fields to be more informative
Browse files Browse the repository at this point in the history
They are both protected by pMu, so should be in the pMu block.
  • Loading branch information
kortschak committed May 25, 2024
1 parent f9a8e38 commit 0896f75
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions cmd/watcher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,20 +166,18 @@ type daemon struct {
// conn is the connection to the kernel.
conn *jsonrpc2.Connection

detailer detailer

timezone current

ctx context.Context
log *slog.Logger
level *slog.LevelVar
addSource *atomic.Bool
cancel context.CancelFunc

pMu sync.Mutex
polling time.Duration
pStop chan struct{}
rules atomic.Value // map[string]cel.Program
pMu sync.Mutex
polling time.Duration
timezone current
detailer detailer
pStop chan struct{}
rules atomic.Value // map[string]cel.Program

hMu sync.Mutex
heartbeat time.Duration
Expand Down

0 comments on commit 0896f75

Please sign in to comment.