(cobra) add IXCobraConfig struct to pass cobra config around

This commit is contained in:
Benjamin Sergeant
2020-03-11 10:48:27 -07:00
parent cb9f0cb968
commit 0a11132b07
13 changed files with 93 additions and 113 deletions

View File

@ -13,6 +13,7 @@ set (IXCOBRA_HEADERS
ixcobra/IXCobraConnection.h
ixcobra/IXCobraMetricsThreadedPublisher.h
ixcobra/IXCobraMetricsPublisher.h
ixcobra/IXCobraConfig.h
)
add_library(ixcobra STATIC

View File

@ -0,0 +1,31 @@
/*
* IXCobraConfig.h
* Author: Benjamin Sergeant
* Copyright (c) 2020 Machine Zone, Inc. All rights reserved.
*/
#pragma once
namespace ix
{
struct CobraConfig
{
std::string appkey;
std::string endpoint;
std::string rolename;
std::string rolesecret;
CobraConfig(const std::string& a = std::string(),
const std::string& e = std::string(),
const std::string& r = std::string(),
const std::string& s = std::string())
: appkey(a)
, endpoint(e)
, rolename(r)
, rolesecret(s)
{
;
}
};
} // namespace ix

View File

@ -17,6 +17,8 @@
#include <unordered_map>
#include <limits>
#include "IXCobraConfig.h"
namespace ix
{
class WebSocket;