diff --git a/aws/cwatch/base.go b/aws/cwatch/base.go new file mode 100644 index 0000000..ff661a0 --- /dev/null +++ b/aws/cwatch/base.go @@ -0,0 +1,15 @@ +package cwatch + +import ( + "sync" + + "github.com/aws/aws-sdk-go-v2/service/cloudwatch" + "github.com/aws/aws-sdk-go-v2/service/cloudwatch/types" +) + +type CWService interface { + Queue(d types.MetricDatum) + StartQueue(wg *sync.WaitGroup) + StopQueue() + Prepare(data []types.MetricDatum) *cloudwatch.PutMetricDataInput +} diff --git a/aws/cwatch/service.go b/aws/cwatch/service.go index 02f43db..613104b 100644 --- a/aws/cwatch/service.go +++ b/aws/cwatch/service.go @@ -71,3 +71,5 @@ func (s *Service) processBatch(batch []types.MetricDatum) { slog.Error("error sending metrics to cloudwatch", "error", err, "count", len(batch)) } } + +var _ CWService = (*Service)(nil)