chore: refactor agent routines that use the v2 API (#12223)
In anticipation of needing the `LogSender` to run on a context that doesn't get immediately canceled when you `Close()` the agent, I've undertaken a little refactor to manage the goroutines that get run against the Tailnet and Agent API connection. This handles controlling two contexts, one that gets canceled right away at the start of graceful shutdown, and another that stays up to allow graceful shutdown to complete.
This commit is contained in:
1 parent
66585f042f
commit
af3fdc68c3
9 files changed
+501
-259
No files matched your search
@@ -193,7 +193,7 @@ func NewOptions(t testing.TB, options *Options) (func(http.Handler), context.Can
|
||||
options = &Options{}
|
||||
}
|
||||
if options.Logger == nil {
|
||||
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug)
|
||||
logger := slogtest.Make(t, nil).Leveled(slog.LevelDebug).Named("coderd")
|
||||
options.Logger = &logger
|
||||
}
|
||||
if options.GoogleTokenValidator == nil {
|
||||
|
||||
Reference in new issue
Block a user