2016-04-21 16:02:48 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "binary-cache-store.hh"
|
|
|
|
|
|
|
|
#include <atomic>
|
|
|
|
|
|
|
|
namespace nix {
|
|
|
|
|
|
|
|
class S3BinaryCacheStore : public BinaryCacheStore
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
|
2016-06-01 14:49:12 +02:00
|
|
|
S3BinaryCacheStore(const Params & params)
|
2016-05-04 20:15:41 +02:00
|
|
|
: BinaryCacheStore(params)
|
2016-04-21 16:02:48 +02: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};
|
|
|
|
};
|
|
|
|
|
|
|
|
const Stats & getS3Stats();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|