rc: factor server code into rcserver and implement serving objects

If a GET or HEAD request is receivied with a URL parameter of fs then
it will be served from that remote.
This commit is contained in:
Nick Craig-Wood
2018-10-27 18:29:20 +01:00
parent aa9b2c31f4
commit 0bfa9811f7
9 changed files with 253 additions and 199 deletions

View File

@@ -84,7 +84,7 @@ func rcError(in Params) (out Params, err error) {
// List the registered commands
func rcList(in Params) (out Params, err error) {
out = make(Params)
out["commands"] = registry.list()
out["commands"] = Calls.List()
return out, nil
}
@@ -125,7 +125,6 @@ func rcMemStats(in Params) (out Params, err error) {
// Do a garbage collection run
func rcGc(in Params) (out Params, err error) {
out = make(Params)
runtime.GC()
return out, nil
return nil, nil
}