mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
added tslint.json
This commit is contained in:
parent
094e41b9ce
commit
3ee5cdec27
@ -1,8 +1,8 @@
|
||||
import { Eureka } from 'eureka-js-client';
|
||||
|
||||
// example configuration
|
||||
// example configuration
|
||||
let client = new Eureka({
|
||||
// application instance information
|
||||
// application instance information
|
||||
instance: {
|
||||
app: 'jqservice',
|
||||
hostName: 'localhost',
|
||||
@ -14,8 +14,8 @@ let client = new Eureka({
|
||||
},
|
||||
},
|
||||
eureka: {
|
||||
// eureka server host / port
|
||||
// eureka server host / port
|
||||
host: '192.168.99.100',
|
||||
port: 32768,
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
101
types/eureka-js-client/index.d.ts
vendored
101
types/eureka-js-client/index.d.ts
vendored
@ -3,78 +3,73 @@
|
||||
// Definitions by: Ilko Hoffmann <https://github.com/Schnillz>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
export declare class Eureka {
|
||||
export class Eureka {
|
||||
constructor(config: EurekaClient.EurekaConfig)
|
||||
start(): void;
|
||||
stop(): void;
|
||||
getInstancesByAppId(appId: string): Array<string>;
|
||||
getInstancesByVipAddress(vidAddress: string): Array<string>;
|
||||
getInstancesByAppId(appId: string): string[];
|
||||
getInstancesByVipAddress(vidAddress: string): string [];
|
||||
}
|
||||
|
||||
declare namespace EurekaClient {
|
||||
|
||||
export namespace EurekaClient {
|
||||
type InstanceStatus = 'UP' | 'DOWN' | 'STARTING' | 'OUT_OF_SERVICE' | 'UNKNOWN';
|
||||
type ActionType = 'ADDED' | 'MODIFIED' | 'DELETED';
|
||||
type DataCenterName = 'Netflix' | 'Amazon' | 'MyOwn';
|
||||
|
||||
interface EurekaConfig {
|
||||
instance: EurekaInstanceConfig,
|
||||
eureka: EurekaClientConfig
|
||||
instance: EurekaInstanceConfig;
|
||||
eureka: EurekaClientConfig;
|
||||
}
|
||||
interface EurekaInstanceConfig {
|
||||
app: string,
|
||||
hostName: string,
|
||||
ipAddr: string,
|
||||
vipAddress: string,
|
||||
dataCenterInfo: DataCenterInfo,
|
||||
port?: number,
|
||||
instanceId?: string,
|
||||
appGroupName?: string,
|
||||
sid?: string,
|
||||
securePort?: PortWrapper,
|
||||
homePageUrl?: string,
|
||||
statusPageUrl?: string,
|
||||
healthCheckUrl?: string,
|
||||
secureHealthCheckUrl?: string,
|
||||
secureVipAddress?: string,
|
||||
countryId?: number,
|
||||
status?: InstanceStatus,
|
||||
overriddenstatus?: InstanceStatus,
|
||||
leaseInfo?: LeaseInfo,
|
||||
isCoordinatingDiscoveryServer?: boolean,
|
||||
metadata?: Array<[string, string]>,
|
||||
lastUpdatedTimestamp?: number,
|
||||
lastDirtyTimestamp?: number,
|
||||
actionType?: ActionType,
|
||||
asgName?: string
|
||||
app: string;
|
||||
hostName: string;
|
||||
ipAddr: string;
|
||||
vipAddress: string;
|
||||
dataCenterInfo: DataCenterInfo;
|
||||
port?: number;
|
||||
instanceId?: string;
|
||||
appGroupName?: string;
|
||||
sid?: string;
|
||||
securePort?: PortWrapper;
|
||||
homePageUrl?: string;
|
||||
statusPageUrl?: string;
|
||||
healthCheckUrl?: string;
|
||||
secureHealthCheckUrl?: string;
|
||||
secureVipAddress?: string;
|
||||
countryId?: number;
|
||||
status?: InstanceStatus;
|
||||
overriddenstatus?: InstanceStatus;
|
||||
leaseInfo?: LeaseInfo;
|
||||
isCoordinatingDiscoveryServer?: boolean;
|
||||
}
|
||||
interface EurekaClientConfig {
|
||||
host: string,
|
||||
port: number,
|
||||
heartbeatInterval?: number,
|
||||
registryFetchInterval?: number,
|
||||
maxRetries?: number,
|
||||
requestRetryDelay?: number,
|
||||
fetchRegistry?: boolean,
|
||||
filterUpInstances?: boolean,
|
||||
servicePath?: string,
|
||||
ssl?: boolean,
|
||||
useDns?: boolean,
|
||||
preferSameZone?: boolean,
|
||||
clusterRefreshInterval?: boolean,
|
||||
fetchMetadata?: boolean,
|
||||
registerWithEureka?: boolean,
|
||||
useLocalMetadata?: boolean,
|
||||
preferIpAddress?: boolean
|
||||
host: string;
|
||||
port: number;
|
||||
heartbeatInterval?: number;
|
||||
registryFetchInterval?: number;
|
||||
maxRetries?: number;
|
||||
requestRetryDelay?: number;
|
||||
fetchRegistry?: boolean;
|
||||
filterUpInstances?: boolean;
|
||||
servicePath?: string;
|
||||
ssl?: boolean;
|
||||
useDns?: boolean;
|
||||
preferSameZone?: boolean;
|
||||
clusterRefreshInterval?: boolean;
|
||||
fetchMetadata?: boolean;
|
||||
registerWithEureka?: boolean;
|
||||
useLocalMetadata?: boolean;
|
||||
preferIpAddress?: boolean;
|
||||
}
|
||||
interface PortWrapper {
|
||||
enabled: boolean,
|
||||
port: number
|
||||
enabled: boolean;
|
||||
port: number;
|
||||
}
|
||||
interface LeaseInfo {
|
||||
renewalIntervalInSecs: number;
|
||||
durationInSecs: number;
|
||||
}
|
||||
interface DataCenterInfo {
|
||||
name: 'Netflix' | 'Amazon' | 'MyOwn';
|
||||
name: DataCenterName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
types/eureka-js-client/tslint.json
Normal file
1
types/eureka-js-client/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "../tslint.json" }
|
||||
Loading…
Reference in New Issue
Block a user