2016-04-21 14:02:48 +00:00
|
|
|
#pragma once
|
2023-04-01 03:18:41 +00:00
|
|
|
///@file
|
2016-04-21 14:02:48 +00:00
|
|
|
|
|
|
|
#include "binary-cache-store.hh"
|
|
|
|
|
|
|
|
#include <atomic>
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
2020-12-20 15:33:12 +00:00
|
|
|
class S3BinaryCacheStore : public virtual BinaryCacheStore
|
2016-04-21 14:02:48 +00:00
|
|
|
{
|
|
|
|
protected:
|
|
|
|
|
2020-12-20 15:33:12 +00:00
|
|
|
S3BinaryCacheStore(const Params & params);
|
2016-04-21 14:02:48 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
struct Stats
|
|
|
|
{
|
|
|
|
std::atomic<uint64_t> put{0};
|
|
|
|
std::atomic<uint64_t> putBytes{0};
|
|
|
|
std::atomic<uint64_t> putTimeMs{0};
|
|
|
|
std::atomic<uint64_t> get{0};
|
|
|
|
std::atomic<uint64_t> getBytes{0};
|
|
|
|
std::atomic<uint64_t> getTimeMs{0};
|
|
|
|
std::atomic<uint64_t> head{0};
|
|
|
|
};
|
|
|
|
|
2016-10-06 14:34:14 +00:00
|
|
|
virtual const Stats & getS3Stats() = 0;
|
2016-04-21 14:02:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|