milvus/cpp/src/server/ServerConfig.h
groot 32b5d7c4a4 client call api
Former-commit-id: 1abe8528051e0fb01dc2922f3ac71c739ae6df57
2019-04-17 10:45:39 +08:00

45 lines
1.4 KiB
C++

/*******************************************************************************
* Copyright 上海赜睿信息科技有限公司(Zilliz) - All Rights Reserved
* Unauthorized copying of this file, via any medium is strictly prohibited.
* Proprietary and confidential.
******************************************************************************/
#pragma once
#include "utils/Error.h"
#include "config/ConfigNode.h"
#include <yaml-cpp/yaml.h>
namespace zilliz {
namespace vecwise {
namespace server {
static const std::string CONFIG_SERVER = "server_config";
static const std::string CONFIG_SERVER_ADDRESS = "address";
static const std::string CONFIG_SERVER_PORT = "port";
static const std::string CONFIG_SERVER_PROTOCOL = "transfer_protocol";
static const std::string CONFIG_SERVER_MODE = "server_mode";
static const std::string CONFIG_SERVER_DB_URL = "db_backend_url";
static const std::string CONFIG_SERVER_DB_NAME = "db_name";
static const std::string CONFIG_LOG = "log_config";
static const std::string CONFIG_CACHE = "cache_config";
static const std::string CONFIG_CACHE_CAPACITY = "cache_capacity";
class ServerConfig {
public:
static ServerConfig &GetInstance();
ServerError LoadConfigFile(const std::string& config_filename);
void PrintAll() const;
ConfigNode GetConfig(const std::string& name) const;
ConfigNode& GetConfig(const std::string& name);
};
}
}
}