forked from herokumx/kafka-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigVars.cs
32 lines (28 loc) · 948 Bytes
/
ConfigVars.cs
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
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace FXProducer
{
public sealed class ConfigVars
{
public string KafkaTopic = string.Empty;
public string EnpointUrl = string.Empty;
private ConfigVars()
{
EnpointUrl = Environment.GetEnvironmentVariable("HTTP_ENDPOINT_URL");
KafkaTopic = Environment.GetEnvironmentVariable("KAFKA_TOPIC");
//for local testing
//KafkaTopic = "FX-VIP";
//EnpointUrl = "http://fx-kafka.herokuapp.com/api/messages";
}
public static ConfigVars Instance { get { return ConfigVarInstance.Instance; } }
private class ConfigVarInstance
{
static ConfigVarInstance()
{
}
internal static readonly ConfigVars Instance = new ConfigVars();
}
}
}