Ejemplo n.º 1
0
        public void TestAppEndpoint()
        {
            var expectedJson = @"{""user"":""steve"",""type"":""app""}";
            var endpoint     = new AppEndpoint
            {
                User = "******"
            };

            Assert.Equal(expectedJson, JsonConvert.SerializeObject(endpoint));
        }
Ejemplo n.º 2
0
        public static string Reconcile(SimpleCache <string> cache, AppEndpoint appEndpoint)
        {
            var snapshot = cache.GetSnapshot("key");

            if (snapshot == null)
            {
                snapshot = Data.CreateBaseSnapshot();
            }

            var cluster = Data.CreateCluster(appEndpoint.Name !);
            var clusterLoadAssignment = Data.CreateClusterLoadAssignment(cluster.Name, new[] { (appEndpoint.Ip !, appEndpoint.Port) });
Ejemplo n.º 3
0
 public AuthedService()
 {
     AppEndpoint    = new AppEndpoint(_requester);
     ClientEndpoint = new ClientEndpoint(_requester);
 }