🚚 Merge code from old patcher

This commit is contained in:
C-3PO 2018-06-22 12:25:31 +02:00
parent 5806b96f4f
commit fab92b078b
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
4 changed files with 260 additions and 0 deletions

View file

@ -0,0 +1,25 @@
type NetworkType = 'master' | 'akamai' | 'level3-eu' | 'level3-us' | 'unknown';
/** One search result in a DNS query response */
interface IDnsResult {
/** IP address to which cdn-patch.swtor.com resolves to. */
address: string;
/** Which network / cloud provider this IP address belongs to. */
type: NetworkType;
/** Time-to-live, given in seconds, of how long the results last, or when we need to update them. */
ttl: number;
}
/** An IP address that was returned by resolved the CDN domain. */
interface IServerEntry {
/** IP address to which cdn-patch.swtor.com resolves to. */
ip: string;
/** Which network / cloud provider this IP address belongs to. */
type: NetworkType;
/** When we were last able to resolve to this IP address. */
lastSeen: number;
/** A measure of how reliable this IP address is, based on how often and how recently it was resolved. */
weight: number;
}
export { IDnsResult, IServerEntry };