// 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); }
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."); }