diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2017-08-17 15:17:35 +0200 |
---|---|---|
committer | Maciej Wereski <m.wereski@partner.samsung.com> | 2017-09-13 17:42:50 +0200 |
commit | 617bc0169037fb1d3f5525e4540d1a1f34582b76 (patch) | |
tree | c507ed390ab0fbe9d087d87053c54477560754bf /boruta.go | |
parent | 1e85a24b8cc48946d8d5443140d0bd074276dc01 (diff) | |
download | boruta-617bc0169037fb1d3f5525e4540d1a1f34582b76.tar.gz boruta-617bc0169037fb1d3f5525e4540d1a1f34582b76.tar.bz2 boruta-617bc0169037fb1d3f5525e4540d1a1f34582b76.zip |
Add Dryad interface
User, Admin and Worker communication to Boruta was designed, but an
interface in opposite direction, from Server to Worker, was missing.
Change-Id: I915c31e12b0b49d6863d1162734db7a324d709d1
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Reviewed-on: https://mcdsrvbld02.digital.local/review/49405
Reviewed-by: Maciej Wereski <m.wereski@partner.samsung.com>
Tested-by: Maciej Wereski <m.wereski@partner.samsung.com>
Diffstat (limited to 'boruta.go')
-rw-r--r-- | boruta.go | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -22,6 +22,7 @@ package boruta import ( + "crypto/rsa" "time" ) @@ -187,3 +188,17 @@ type Server interface { Superviser Workers } + +// Dryad is a MuxPi management interface used by Boruta. +type Dryad interface { + // PutInMaintenance prepares MuxPi for administrative action. + // It blinks LEDs, prints msg on the OLED display, etc. + PutInMaintenance(msg string) error + // Prepare creates appropriate user, generates RSA key, installs public key + // so that it can be used for SSH authentication and returns private key. + // It removes current instance of the user, etc. + Prepare() (*rsa.PrivateKey, error) + // Healthcheck tests Dryad for system state, STM functions and state on MuxPi. + // It may cause Dryad to call SetFail of Worker interface if the problem detected is critical. + Healthcheck() error +} |