示例#1
0
        // Set NEW Connections

        public void SetNewServerConnection(string serverId, string url)
        {
            GrpcChannel channel = GrpcChannel.ForAddress(url);

            PuppetMasterServerService.PuppetMasterServerServiceClient client =
                new PuppetMasterServerService.PuppetMasterServerServiceClient(channel);
            serverSet.TryAdd(serverId, new Server(serverId, client));

            SetNewPCSConnection(url);
        }
示例#2
0
 public Server(string id, PuppetMasterServerService.PuppetMasterServerServiceClient client)
 {
     Id   = id ?? throw new ArgumentNullException("Server Id cannot be null.");
     Stub = client ?? throw new ArgumentNullException("Client cannot be null.");
 }