Index: appengine/cmd/dm/service/service.go |
diff --git a/appengine/cmd/dm/service/service.go b/appengine/cmd/dm/service/service.go |
index 1c327cdab298fe31d59bb2892ce51ef30d096282..5001ff5b0e7b03119688df2942f748a067001439 100644 |
--- a/appengine/cmd/dm/service/service.go |
+++ b/appengine/cmd/dm/service/service.go |
@@ -6,12 +6,15 @@ package service |
import ( |
"github.com/GoogleCloudPlatform/go-endpoints/endpoints" |
+ "github.com/luci/luci-go/appengine/cmd/dm/distributor" |
"github.com/luci/luci-go/appengine/ephelper" |
) |
// DungeonMaster is the endpoints server object. |
type DungeonMaster struct { |
ephelper.ServiceBase |
+ |
+ distributors distributor.Registry |
} |
// MethodInfo provides the method info map that each service |
@@ -31,3 +34,10 @@ func RegisterEndpointsService(srv *endpoints.Server) error { |
return ephelper.Register(srv, &DungeonMaster{}, |
DungeonMasterServiceInfo, MethodInfo) |
} |
+ |
+// RegisterEndpointsServiceWithDistributors is used to actually set up the DM |
+// frontends. |
+func RegisterEndpointsServiceWithDistributors(srv *endpoints.Server, reg distributor.Registry) error { |
+ return ephelper.Register(srv, &DungeonMaster{distributors: reg}, |
+ DungeonMasterServiceInfo, MethodInfo) |
+} |