-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c6578e7
commit fe51755
Showing
3 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,28 @@ | ||
// check status will take in the server object, so it has a reference and can continually check the status, and return an updated Health object to send back to client | ||
|
||
// if no services provided, returns whole status map in the format of the proto file | ||
// this is | ||
|
||
|
||
// NOTE the check status function is basically the handler for Check.js as you already noted | ||
function checkStatus(Server, call, services) {} | ||
|
||
module.exports = function(call) { | ||
// call.body will have this structure: | ||
// { | ||
// interval: number | ||
// services: [] | ||
// } | ||
console.log(call.body); | ||
console.log("this inside of check", this); | ||
|
||
// destructure services and interval off of the call | ||
|
||
// if interval is 0, set it to be 60seconds for a default | ||
|
||
// set a const "server" to be the value of this (this is currently the server, so you have access to the get status properties) to store in the closure | ||
|
||
// setInterval at "interval seconds" | ||
// run checkStatus to checkStatus calling on server and the services destructured off of call | ||
// add logic to .throw | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters