blob: e599d8a23dfd42653b2a15e8ab7a1c3b7e943549 (
plain) (
blame)
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
|
#pragma once
#include <util/generic/strbuf.h>
#include <optional>
#include <string>
#include <vector>
namespace NYT {
////////////////////////////////////////////////////////////////////////////////
// NB: Currently not supported on other platforms.
#if defined(_linux_) || defined(_darwin_)
std::vector<std::string> GetEnvironNameValuePairs();
#endif
std::pair<TStringBuf, std::optional<TStringBuf>> ParseEnvironNameValuePair(TStringBuf pair);
std::optional<std::string> TryGetEnvValue(TStringBuf name);
std::string GetEnvValueOrThrow(TStringBuf name);
////////////////////////////////////////////////////////////////////////////////
} // namespace NYT
|