From bea68ba5240214073c5a8d644e118d9f9185ff8c Mon Sep 17 00:00:00 2001 From: Solomon Hykes Date: Tue, 22 Apr 2014 16:51:06 -0700 Subject: [PATCH] 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 (github: shykes) Upstream-commit: 4353f25e10d19f414bdd5b20488824fb2b834d6e Component: engine --- components/engine/engine/engine.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/engine/engine/engine.go b/components/engine/engine/engine.go index 6a54b3591e..7e1f192a2b 100644 --- a/components/engine/engine/engine.go +++ b/components/engine/engine/engine.go @@ -12,6 +12,13 @@ import ( "strings" ) +// Installer is a standard interface for objects which can "install" themselves +// on an engine by registering handlers. +// This can be used as an entrypoint for external plugins etc. +type Installer interface { + Install(*Engine) error +} + type Handler func(*Job) Status var globalHandlers map[string]Handler