Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1301)

Unified Diff: appengine/cmd/dm/service/service.go

Issue 1537883002: Initial distributor implementation (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: work in progress Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)
+}

Powered by Google App Engine
This is Rietveld 408576698