Browse code

engine.Installer: a standard interface for "installable" services

Installer is a standard interface for objects which can "install"
themselves an engine by registering handlers.

This can be used as an entrypoint for external plugins etc.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)

Solomon Hykes authored on 2014/04/23 08:51:06
Showing 1 changed files
... ...
@@ -10,6 +10,13 @@ import (
10 10
 	"strings"
11 11
 )
12 12
 
13
+// Installer is a standard interface for objects which can "install" themselves
14
+// on an engine by registering handlers.
15
+// This can be used as an entrypoint for external plugins etc.
16
+type Installer interface {
17
+	Install(*Engine) error
18
+}
19
+
13 20
 type Handler func(*Job) Status
14 21
 
15 22
 var globalHandlers map[string]Handler