Skip to content

Commit ad9441c

Browse files
committed
chore: fixing indentations
1 parent adb2668 commit ad9441c

File tree

3 files changed

+22
-23
lines changed

3 files changed

+22
-23
lines changed

src/app.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
// import { spawn } from "child_process";
21
import KubeApiWrapper = require('./lib/kube-scanner');
32

43
export async function monitor(config, logger) {
54
setTimeout(() => {
65
setInterval(async () => {
7-
const scan_output = await KubeApiWrapper.scan();
8-
console.log(scan_output);
6+
const scan_output = await KubeApiWrapper.scan();
7+
console.log(scan_output);
98
}, config.MONITOR.SCAN_INTERVAL);
109
}, config.MONITOR.INITIAL_REFRESH);
1110
}

src/lib/kube-scanner/watchers/namespaces.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ kc.loadFromDefault();
55

66
const watch = new k8s.Watch(kc);
77
const req = watch.watch('/api/v1/namespaces',
8-
// optional query parameters can go here.
9-
{},
10-
// callback is called for each received object.
11-
(type, obj) => {
12-
if (type === 'ADDED') {
13-
console.log('new object:');
14-
} else if (type === 'MODIFIED') {
15-
console.log('changed object:');
16-
} else if (type === 'DELETED') {
17-
console.log('deleted object:');
18-
} else {
19-
console.log('unknown type: ' + type);
20-
}
21-
console.log(obj);
22-
},
23-
// done callback is called if the watch terminates normally
24-
(err) => {
25-
console.error(err);
26-
});
8+
// optional query parameters can go here.
9+
{},
10+
// callback is called for each received object.
11+
(type, obj) => {
12+
if (type === 'ADDED') {
13+
console.log('new object:');
14+
} else if (type === 'MODIFIED') {
15+
console.log('changed object:');
16+
} else if (type === 'DELETED') {
17+
console.log('deleted object:');
18+
} else {
19+
console.log('unknown type: ' + type);
20+
}
21+
console.log(obj);
22+
},
23+
// done callback is called if the watch terminates normally
24+
(err) => {
25+
console.error(err);
26+
});
2727

2828
// watch returns a request object which you can use to abort the watch.
2929
setTimeout(() => { req.abort(); }, 10 * 1000);

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"compilerOptions": {
33
"outDir": "./dist",
44
"incremental": true,
5-
"target": "es2017",
5+
"target": "es2018",
66
"module": "commonjs",
77
"sourceMap": true,
88
"pretty": true,

0 commit comments

Comments
 (0)