LicenseCheck.h 989 字节
Newer Older
G
groot 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
//#pragma once
//
//#include "utils/Error.h"
//#include "LicenseLibrary.h"
//
//#include <boost/asio.hpp>
//
//#include <thread>
//#include <memory>
//
//namespace zilliz {
//namespace milvus {
//namespace server {
//
//class LicenseCheck {
//private:
//    LicenseCheck();
//    ~LicenseCheck();
//
//public:
//    static LicenseCheck &
//    GetInstance() {
//        static LicenseCheck instance;
//        return instance;
//    };
//
//    static ServerError
//    LegalityCheck(const std::string &license_file_path);
//
//    ServerError
//    StartCountingDown(const std::string &license_file_path);
//
//    ServerError
//    StopCountingDown();
//
//private:
//    static ServerError
//    AlterFile(const std::string &license_file_path,
//              const boost::system::error_code &ec,
//              boost::asio::deadline_timer *pt);
//
//private:
//    boost::asio::io_service io_service_;
//    std::shared_ptr<std::thread> counting_thread_;
//
//};
//
//}
//}
//}
//
//