(homePaths aghconfig.HomePaths)
| 490 | } |
| 491 | |
| 492 | func newDefaultServer(homePaths aghconfig.HomePaths) *Server { |
| 493 | return &Server{ |
| 494 | homePaths: homePaths, |
| 495 | config: aghconfig.DefaultWithHome(homePaths), |
| 496 | logger: slog.Default(), |
| 497 | now: func() time.Time { |
| 498 | return time.Now().UTC() |
| 499 | }, |
| 500 | pollInterval: defaultPollInterval, |
| 501 | agentLoader: aghconfig.LoadAgentDef, |
| 502 | } |
| 503 | } |
| 504 | |
| 505 | func applyOptions(server *Server, opts []Option) { |
| 506 | for _, opt := range opts { |