diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2018-01-23 16:05:44 +0100 |
---|---|---|
committer | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2018-06-18 14:16:19 +0200 |
commit | 3303afc21a5d8a0370a65b29340b076ca01996a6 (patch) | |
tree | fecea2847556bcc5980f60b4e662ebcdaac54a32 /dryad/conf | |
parent | a2f2f68976d10d54aac1bce12b4810f9c6f9f736 (diff) | |
download | boruta-3303afc21a5d8a0370a65b29340b076ca01996a6.tar.gz boruta-3303afc21a5d8a0370a65b29340b076ca01996a6.tar.bz2 boruta-3303afc21a5d8a0370a65b29340b076ca01996a6.zip |
Add STMsocket to dryad/conf
Due to change in git.tizen.org/tools/muxpi/sw/nanopi/stm communication
medium has changed. Preferably, dryad should connect to the running
process of stm via unix socket exposing Go RPC interface.
It is possible to use it in the old way by assigning "" to stm_socket
configuration entry.
Change-Id: If6f4b41c9dbf467e3d40772eb52b55cbbc79d749
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'dryad/conf')
-rw-r--r-- | dryad/conf/conf.go | 5 | ||||
-rw-r--r-- | dryad/conf/conf_test.go | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/dryad/conf/conf.go b/dryad/conf/conf.go index 42675ba..049fb7b 100644 --- a/dryad/conf/conf.go +++ b/dryad/conf/conf.go @@ -40,7 +40,8 @@ func NewConf() *General { Name: "boruta-user", Groups: []string{}, }, - SDcard: "/dev/sdX", + SDcard: "/dev/sdX", + STMsocket: "/run/stm.socket", } } @@ -68,6 +69,8 @@ type General struct { User *User `toml:"user"` // SDcard is a base path to block device of sdcard. SDcard string `toml:"sdcard"` + // STMsocket is a path to the socket on which Go RPC service of stm.Interface is available. + STMsocket string `toml:"stm_path"` } // Marshal writes TOML representation of g to w. diff --git a/dryad/conf/conf_test.go b/dryad/conf/conf_test.go index f1f7177..f8f9997 100644 --- a/dryad/conf/conf_test.go +++ b/dryad/conf/conf_test.go @@ -31,6 +31,7 @@ var _ = Describe("Conf", func() { marshaled := `listen_address = ":7175" boruta_address = "" sdcard = "/dev/sdX" +stm_path = "/run/stm.socket" [caps] @@ -45,7 +46,8 @@ sdcard = "/dev/sdX" Name: "boruta-user", Groups: []string{}, }, - SDcard: "/dev/sdX", + SDcard: "/dev/sdX", + STMsocket: "/run/stm.socket", } var g *General |