Fix comment wrapping.
Cameron Stitt
6 years ago
28 | 28 | logger log.Logger |
29 | 29 | } |
30 | 30 | |
31 | // New returns a CloudWatch object that may be used to create metrics. Namespace is | |
32 | // applied to all created metrics and maps to the CloudWatch namespace. | |
33 | // Callers must ensure that regular calls to Send are performed, either manually or with one of the helper methods. | |
31 | // New returns a CloudWatch object that may be used to create metrics. | |
32 | // Namespace is applied to all created metrics and maps to the CloudWatch namespace. | |
33 | // Callers must ensure that regular calls to Send are performed, either | |
34 | // manually or with one of the helper methods. | |
34 | 35 | func New(namespace string, svc cloudwatchiface.CloudWatchAPI, logger log.Logger) *CloudWatch { |
35 | 36 | return &CloudWatch{ |
36 | 37 | namespace: namespace, |
73 | 74 | return h |
74 | 75 | } |
75 | 76 | |
76 | // WriteLoop is a helper method that invokes Send every | |
77 | // time the passed channel fires. This method blocks until the channel is | |
78 | // closed, so clients probably want to run it in its own goroutine. For typical | |
79 | // usage, create a time.Ticker and pass its C channel to this method. | |
77 | // WriteLoop is a helper method that invokes Send every time the passed | |
78 | // channel fires. This method blocks until the channel is closed, so clients | |
79 | // probably want to run it in its own goroutine. For typical usage, create a | |
80 | // time.Ticker and pass its C channel to this method. | |
80 | 81 | func (cw *CloudWatch) WriteLoop(c <-chan time.Time) { |
81 | 82 | for range c { |
82 | 83 | if err := cw.Send(); err != nil { |