From 74d62a1bbea9c1b7398be7750dc1c67be39d13f5 Mon Sep 17 00:00:00 2001 From: Vladyslav Budichenko Date: Fri, 13 Sep 2024 11:44:43 -0400 Subject: [PATCH] feat: add interface --- clients/database/interface.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 clients/database/interface.go diff --git a/clients/database/interface.go b/clients/database/interface.go new file mode 100644 index 0000000..2d5587e --- /dev/null +++ b/clients/database/interface.go @@ -0,0 +1,11 @@ +package database + +import "context" + +type MetricsDatabase interface { + SaveProxiedRequestMetric(ctx context.Context, prm *ProxiedRequestMetric) error + ListProxiedRequestMetricsWithPagination(ctx context.Context, cursor int64, limit int) ([]ProxiedRequestMetric, int64, error) + CountAttachedProxiedRequestMetricPartitions(ctx context.Context) (int64, error) + GetLastCreatedAttachedProxiedRequestMetricsPartitionName(ctx context.Context) (string, error) + DeleteProxiedRequestMetricsOlderThanNDays(ctx context.Context, days int) error +}