Package list golang-github-go-kit-kit / 0933e61
Fix comment wrapping. Cameron Stitt 4 years ago
1 changed file(s) with 8 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
2828 logger log.Logger
2929 }
3030
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.
3435 func New(namespace string, svc cloudwatchiface.CloudWatchAPI, logger log.Logger) *CloudWatch {
3536 return &CloudWatch{
3637 namespace: namespace,
7374 return h
7475 }
7576
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.
8081 func (cw *CloudWatch) WriteLoop(c <-chan time.Time) {
8182 for range c {
8283 if err := cw.Send(); err != nil {