src/client/serviceCtl.ts   A
last analyzed

Complexity

Total Complexity 10
Complexity/F 1

Size

Lines of Code 23
Function Count 10

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 10
eloc 22
dl 0
loc 23
c 0
b 0
f 0
rs 10
mnd 0
bc 0
fnc 10
bpm 0
cpm 1
noi 0

10 Functions

Rating   Name   Duplication   Size   Complexity  
A ServiceCtl.stop 0 2 1
A ServiceCtl.restartAsRoot 0 1 1
A ServiceCtl.restart 0 2 1
A ServiceCtl.reloadAsRoot 0 1 1
A ServiceCtl.reload 0 2 1
A ServiceCtl.startAsRoot 0 1 1
A ServiceCtl.start 0 2 1
A ServiceCtl.unlink 0 2 1
A ServiceCtl.stopAsRoot 0 1 1
A ServiceCtl.link 0 2 1
1
abstract class ServiceCtl {
2
    abstract name: string
3
    abstract path: string
4
    abstract alias: string
5
6
    abstract start(pkg: string): Promise<boolean>
7
    abstract startAsRoot(pkg: string): Promise<boolean>
8
9
    abstract stop(pkg: string): Promise<boolean>
10
    abstract stopAsRoot(pkg: string): Promise<boolean>
11
12
    abstract restart(pkg: string): Promise<boolean>
13
    abstract restartAsRoot(pkg: string): Promise<boolean>
14
15
    abstract reload(pkg: string): Promise<boolean>
16
    abstract reloadAsRoot(pkg: string): Promise<boolean>
17
18
    abstract link(pkg: string): Promise<boolean>
19
20
    abstract unlink(pkg: string): Promise<boolean>
21
}
22
23
export default ServiceCtl