CtlUtil.hpp 688 B

123456789101112131415161718192021222324252627282930313233
  1. /* (c) ZeroTier, Inc.
  2. * See LICENSE.txt in nonfree/
  3. */
  4. #ifndef ZT_CTLUTIL_HPP
  5. #define ZT_CTLUTIL_HPP
  6. #include <string>
  7. #include <vector>
  8. namespace ZeroTier {
  9. const char* _timestr();
  10. std::vector<std::string> split(std::string str, char delim);
  11. std::string url_encode(const std::string& value);
  12. std::string random_hex_string(std::size_t length);
  13. #ifdef ZT1_CENTRAL_CONTROLLER
  14. void create_gcp_pubsub_topic_if_needed(std::string project_id, std::string topic_id);
  15. void create_gcp_pubsub_subscription_if_needed(
  16. std::string project_id,
  17. std::string subscription_id,
  18. std::string topic_id,
  19. std::string controller_id);
  20. #endif
  21. } // namespace ZeroTier
  22. #endif // namespace ZeroTier