add storage metadata to the runtime and fix its config parsing when running on supervised mode

This commit is contained in:
A.Unger
2021-03-03 17:36:03 +01:00
parent 22e3d2fd35
commit 59de8198c6
8 changed files with 84 additions and 95 deletions
+8 -14
View File
@@ -1,13 +1,6 @@
package command
import (
"fmt"
"github.com/owncloud/ocis/ocis/pkg/runtime"
"log"
"net"
"net/rpc"
"os"
cli "github.com/micro/cli/v2"
"github.com/owncloud/ocis/ocis/pkg/config"
@@ -35,13 +28,14 @@ func RunCommand(cfg *config.Config) *cli.Command {
},
},
Action: func(c *cli.Context) error {
client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Hostname, cfg.Runtime.Port))
if err != nil {
log.Fatal("dialing:", err)
}
res := runtime.RunService(client, os.Args[2])
fmt.Println(res)
// TODO(refs) this implementation changes as we don't depend on os threads anymore.
//client, err := rpc.DialHTTP("tcp", net.JoinHostPort(cfg.Runtime.Hostname, cfg.Runtime.Port))
//if err != nil {
// log.Fatal("dialing:", err)
//}
//
//res := runtime.RunService(client, os.Args[2])
//fmt.Println(res)
return nil
},
}