Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Avatar for KuCalc : devops.
Download
50663 views
1
/*
2
* adapter.js: Abstract base class used by foreverd service adapters
3
*
4
* (C) 2010 Nodejitsu Inc.
5
* MIT LICENCE
6
*
7
*/
8
9
var Adapter = module.exports = function Adapter(service) {
10
this.service = service;
11
};
12
13
//
14
// This should install assets to appropriate places for initialization,
15
// configuration, and storage
16
//
17
// The script will be used on startup to load Service
18
//
19
// Service should listen on something that the management events
20
// can respond to in full duplex
21
//
22
// The installed adapter should send the following events in nssocket protocol
23
// to the Service and invoke methods as appropriate
24
//
25
Adapter.prototype.install = function install() {
26
throw new Error('not implemented');
27
};
28
29
//
30
// This should do a rollback of install completely except for logs
31
//
32
Adapter.prototype.uninstall = function uninstall() {
33
throw new Error('not implemented');
34
};
35
36
//
37
// This should call back with an array of [{file:...,options:...},] to pass to Monitors
38
// this will be invoked when foreverd is created (not started)
39
//
40
Adapter.prototype.load = function load(callback) {
41
throw new Error('not implemented');
42
};
43
44
//
45
// This should tell the OS to start the service
46
// this will not start any applications
47
// make sure the adapter is installed and sending events to foreverd's listener
48
//
49
Adapter.prototype.start = function start(monitors) {
50
throw new Error('not implemented');
51
};
52
53
//
54
// This should tell the OS to start the service
55
// this will not stop any applications
56
// make sure the adapter is installed and sending events to foreverd's listener
57
//
58
Adapter.prototype.stop = function stop(monitors) {
59
throw new Error('not implemented');
60
};
61
62
//
63
// This should tell the OS to reply with info about applications in the service
64
// this will not change any applications
65
// make sure the adapter is installed and sending events to foreverd's listener
66
//
67
Adapter.prototype.status = function status(monitors) {
68
throw new Error('not implemented');
69
};
70
71
//
72
// This should tell the OS to restart the service
73
// this will not restart any applications
74
// make sure the adapter is installed and sending events to foreverd's listener
75
//
76
Adapter.prototype.restart = function restart(monitors) {
77
throw new Error('not implemented');
78
};
79
80
//
81
// This should tell the OS to pause the service
82
// this will prevent any addition or removal of applications
83
// make sure the adapter is installed and sending events to foreverd's listener
84
//
85
Adapter.prototype.pause = function pause(monitors) {
86
throw new Error('not implemented');
87
};
88
89
//
90
// This should tell the OS to resume the service
91
// this will enable any addition or removal of applications
92
// make sure the adapter is installed and sending events to foreverd's listener
93
//
94
Adapter.prototype.resume = function resume(monitors) {
95
throw new Error('not implemented');
96
};
97