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

Unified Diff: common/api/logdog_coordinator/registration/v1/registrationserver_dec.go

Issue 1970823005: LogDog: Add prefix registration endpoint. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-archivist-useconfig
Patch Set: Updated patchset dependency Created 4 years, 7 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: common/api/logdog_coordinator/registration/v1/registrationserver_dec.go
diff --git a/common/api/logdog_coordinator/admin/v1/adminserver_dec.go b/common/api/logdog_coordinator/registration/v1/registrationserver_dec.go
similarity index 61%
copy from common/api/logdog_coordinator/admin/v1/adminserver_dec.go
copy to common/api/logdog_coordinator/registration/v1/registrationserver_dec.go
index f4d13b46b9c3940ddfd6a2c0e93601162e4e839f..b6c9d9f092945028c0b539138825bebd2db5303b 100644
--- a/common/api/logdog_coordinator/admin/v1/adminserver_dec.go
+++ b/common/api/logdog_coordinator/registration/v1/registrationserver_dec.go
@@ -5,22 +5,20 @@ package logdog
import (
proto "github.com/golang/protobuf/proto"
context "golang.org/x/net/context"
-
- google_protobuf "github.com/luci/luci-go/common/proto/google"
)
-type DecoratedAdmin struct {
+type DecoratedRegistration struct {
// Service is the service to decorate.
- Service AdminServer
+ Service RegistrationServer
// Prelude is called in each method before forwarding the call to Service.
// If Prelude returns an error, it is returned without forwarding the call.
Prelude func(c context.Context, methodName string, req proto.Message) (context.Context, error)
}
-func (s *DecoratedAdmin) SetConfig(c context.Context, req *SetConfigRequest) (*google_protobuf.Empty, error) {
- c, err := s.Prelude(c, "SetConfig", req)
+func (s *DecoratedRegistration) RegisterPrefix(c context.Context, req *RegisterPrefixRequest) (*RegisterPrefixResponse, error) {
+ c, err := s.Prelude(c, "RegisterPrefix", req)
if err != nil {
return nil, err
}
- return s.Service.SetConfig(c, req)
+ return s.Service.RegisterPrefix(c, req)
}

Powered by Google App Engine
This is Rietveld 408576698