summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boruta.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/boruta.go b/boruta.go
index 90d34e4..a4d08c8 100644
--- a/boruta.go
+++ b/boruta.go
@@ -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
+}