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

Side by Side Diff: milo/api/proto/buildbotserver_dec.go

Issue 2275123002: Milo: pRPC endpoint for getting Buildbot master data (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Renamed stuff Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « milo/api/proto/buildbot.pb.go ('k') | milo/api/proto/generate.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Code generated by svcdec; DO NOT EDIT 1 // Code generated by svcdec; DO NOT EDIT
2 2
3 package logdog 3 package milo
4 4
5 import ( 5 import (
6 proto "github.com/golang/protobuf/proto" 6 proto "github.com/golang/protobuf/proto"
7 context "golang.org/x/net/context" 7 context "golang.org/x/net/context"
8 ) 8 )
9 9
10 type DecoratedRegistration struct { 10 type DecoratedBuildbot struct {
11 // Service is the service to decorate. 11 // Service is the service to decorate.
12 » Service RegistrationServer 12 » Service BuildbotServer
13 // Prelude is called for each method before forwarding the call to Servi ce. 13 // Prelude is called for each method before forwarding the call to Servi ce.
14 // If Prelude returns an error, it the call is skipped and the error is 14 // If Prelude returns an error, it the call is skipped and the error is
15 // processed via the Postlude (if one is defined), or it is returned dir ectly. 15 // processed via the Postlude (if one is defined), or it is returned dir ectly.
16 Prelude func(c context.Context, methodName string, req proto.Message) (c ontext.Context, error) 16 Prelude func(c context.Context, methodName string, req proto.Message) (c ontext.Context, error)
17 // Postlude is called for each method after Service has processed the ca ll, or 17 // Postlude is called for each method after Service has processed the ca ll, or
18 // after the Prelude has returned an error. This takes the the Service's 18 // after the Prelude has returned an error. This takes the the Service's
19 // response proto (which may be nil) and/or any error. The decorated 19 // response proto (which may be nil) and/or any error. The decorated
20 // service will return the response (possibly mutated) and error that Po stlude 20 // service will return the response (possibly mutated) and error that Po stlude
21 // returns. 21 // returns.
22 Postlude func(c context.Context, methodName string, rsp proto.Message, e rr error) error 22 Postlude func(c context.Context, methodName string, rsp proto.Message, e rr error) error
23 } 23 }
24 24
25 func (s *DecoratedRegistration) RegisterPrefix(c context.Context, req *RegisterP refixRequest) (rsp *RegisterPrefixResponse, err error) { 25 func (s *DecoratedBuildbot) GetCompressedMasterJSON(c context.Context, req *Mast erRequest) (rsp *CompressedMasterJSON, err error) {
26 var newCtx context.Context 26 var newCtx context.Context
27 if s.Prelude != nil { 27 if s.Prelude != nil {
28 » » newCtx, err = s.Prelude(c, "RegisterPrefix", req) 28 » » newCtx, err = s.Prelude(c, "GetCompressedMasterJSON", req)
29 } 29 }
30 if err == nil { 30 if err == nil {
31 c = newCtx 31 c = newCtx
32 » » rsp, err = s.Service.RegisterPrefix(c, req) 32 » » rsp, err = s.Service.GetCompressedMasterJSON(c, req)
33 } 33 }
34 if s.Postlude != nil { 34 if s.Postlude != nil {
35 » » err = s.Postlude(c, "RegisterPrefix", rsp, err) 35 » » err = s.Postlude(c, "GetCompressedMasterJSON", rsp, err)
36 } 36 }
37 return 37 return
38 } 38 }
OLDNEW
« no previous file with comments | « milo/api/proto/buildbot.pb.go ('k') | milo/api/proto/generate.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698