...
1 package observer
2
3 import (
4 "context"
5
6 "github.com/letsencrypt/boulder/cmd"
7 blog "github.com/letsencrypt/boulder/log"
8 _ "github.com/letsencrypt/boulder/observer/probers/crl"
9 _ "github.com/letsencrypt/boulder/observer/probers/dns"
10 _ "github.com/letsencrypt/boulder/observer/probers/http"
11 _ "github.com/letsencrypt/boulder/observer/probers/tls"
12 )
13
14
15 type Observer struct {
16 logger blog.Logger
17 monitors []*monitor
18 shutdown func(ctx context.Context)
19 }
20
21
22 func (o Observer) Start() {
23 for _, mon := range o.monitors {
24 go mon.start(o.logger)
25 }
26
27 defer o.shutdown(context.Background())
28 cmd.WaitForSignal()
29 }
30
View as plain text