@@ -29,9 +29,10 @@ type CloudWatch struct {
2929 logger log.Logger
3030}
3131
32- // New returns a CloudWatch object that may be used to create metrics. Namespace is
33- // applied to all created metrics and maps to the CloudWatch namespace.
34- // Callers must ensure that regular calls to Send are performed, either manually or with one of the helper methods.
32+ // New returns a CloudWatch object that may be used to create metrics.
33+ // Namespace is applied to all created metrics and maps to the CloudWatch namespace.
34+ // Callers must ensure that regular calls to Send are performed, either
35+ // manually or with one of the helper methods.
3536func New (namespace string , svc cloudwatchiface.CloudWatchAPI , logger log.Logger ) * CloudWatch {
3637 return & CloudWatch {
3738 namespace : namespace ,
@@ -74,10 +75,10 @@ func (cw *CloudWatch) NewHistogram(name string, buckets int) metrics.Histogram {
7475 return h
7576}
7677
77- // WriteLoop is a helper method that invokes Send every
78- // time the passed channel fires. This method blocks until the channel is
79- // closed, so clients probably want to run it in its own goroutine. For typical
80- // usage, create a time.Ticker and pass its C channel to this method.
78+ // WriteLoop is a helper method that invokes Send every time the passed
79+ // channel fires. This method blocks until the channel is closed, so clients
80+ // probably want to run it in its own goroutine. For typical usage, create a
81+ // time.Ticker and pass its C channel to this method.
8182func (cw * CloudWatch ) WriteLoop (c <- chan time.Time ) {
8283 for range c {
8384 if err := cw .Send (); err != nil {
0 commit comments