Exemplo n.º 1
0
        /// <summary>
        /// Join Agent
        /// </summary>
        private static void JoinAgent()
        {
            var agentGovern = new AgentGovern();
            var result      = agentGovern.JoinAgent(new JoinAgentParmeter
            {
                Address = "192.168.1.1",
                Wan     = false
            }).GetAwaiter().GetResult();

            Console.WriteLine($"result={result.result}");
            Console.WriteLine($"back content={result.backJson}");
        }
Exemplo n.º 2
0
 private void btnInsertCluster_Click(object sender, EventArgs e)
 {
     try
     {
         var agentGovern = new AgentGovern();
         agentGovern.JoinAgent(new JoinAgentParmeter {
             Address = txbClusterIP.Text, Wan = true
         });
     }
     catch (Exception exc)
     {
         MessageBox.Show(exc.Message);
     }
 }