ZeroTierOne/nonfree/controller/CtlUtil.hpp
Grant Limberg 6196e87303
Some checks failed
/ build_macos (push) Has been cancelled
/ build_windows (push) Has been cancelled
/ Central Controller Build (push) Has been cancelled
/ build_ubuntu (push) Has been cancelled
/ multi-arch-docker (push) Has been cancelled
only create the subscription if pubsub emulator is being used.
2025-09-22 16:32:28 -07:00

33 lines
688 B
C++

/* (c) ZeroTier, Inc.
* See LICENSE.txt in nonfree/
*/
#ifndef ZT_CTLUTIL_HPP
#define ZT_CTLUTIL_HPP
#include <string>
#include <vector>
namespace ZeroTier {
const char* _timestr();
std::vector<std::string> split(std::string str, char delim);
std::string url_encode(const std::string& value);
std::string random_hex_string(std::size_t length);
#ifdef ZT1_CENTRAL_CONTROLLER
void create_gcp_pubsub_topic_if_needed(std::string project_id, std::string topic_id);
void create_gcp_pubsub_subscription_if_needed(
std::string project_id,
std::string subscription_id,
std::string topic_id,
std::string controller_id);
#endif
} // namespace ZeroTier
#endif // namespace ZeroTier