Initial import.

This commit is contained in:
2021-04-19 13:10:40 -07:00
commit 42aa585bd0
16 changed files with 863 additions and 0 deletions

17
cps/ping.go Normal file
View File

@@ -0,0 +1,17 @@
package cps
func init() {
Register("ping", pingHandler)
}
// Ping just returns pong and is used to verify that the system is alive.
func pingHandler(cmd *Command) (*Response, error) {
message := "pong"
if len(cmd.Args) > 0 {
message += " (FYI, no additional args are used)"
}
return &Response{
Message: message,
}, nil
}