WithStartedAt overrides the daemon start time reported by the API.
(startedAt time.Time)
| 144 | |
| 145 | // WithStartedAt overrides the daemon start time reported by the API. |
| 146 | func WithStartedAt(startedAt time.Time) Option { |
| 147 | return func(server *Server) { |
| 148 | server.startedAt = startedAt |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | // WithNow overrides the server clock, mainly for tests. |
| 153 | func WithNow(now func() time.Time) Option { |
no outgoing calls